-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cicd): add dev yml template (#113)
- Loading branch information
Showing
4 changed files
with
150 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024-06-28T14:16:01+01:00 | ||
2024-07-09T12:32:18+01:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# +-----------------------------------------------+ | ||
# | WARNING: This file is generated, do not edit! | | ||
# | Edit _templates/dev.yml.erb instead. | | ||
# +-----------------------------------------------+ | ||
|
||
name: Dev | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install npm dependencies | ||
run: npm install | ||
|
||
- name: Lint - check formatting | ||
run: npm run lint:formatting | ||
|
||
# run a common set of tests against ALL images | ||
smoke-tests: | ||
needs: [lint] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
base: | ||
- <%= @seed[0] %> | ||
tag: | ||
- <%= @seed[1] %> | ||
target: | ||
- <%= @seed[2] %> | ||
include:<% @images.each do |base,tag,target| %> | ||
- base: <%= base %> | ||
tag: <%= tag %> | ||
target: <%= target %><% end %> | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build all images | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
tags: ${{ matrix.tag }} | ||
file: Dockerfile | ||
target: ${{ matrix.target }} | ||
build-args: | | ||
IMAGE=${{ matrix.base }} | ||
TAG=${{ matrix.tag }} | ||
|
||
- name: Show images | ||
run: docker image ls | ||
|
||
- name: Install npm dependencies | ||
run: npm install | ||
|
||
- name: Run tests | ||
run: npm run test:smoke | ||
env: | ||
SNYK_TOKEN: ${{secrets.SNYK_TOKEN}} | ||
IMAGE_TAG: ${{ matrix.tag }} | ||
|
||
# Select tests against specific images | ||
image-specific-tests: | ||
needs: [lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build `python-3.8` image for test | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
tags: python-3.8 | ||
file: Dockerfile | ||
target: linux | ||
build-args: | | ||
IMAGE=python:3.8 | ||
TAG=python-3.8 | ||
- name: Show images | ||
run: docker image ls | ||
- name: Install npm dependencies | ||
run: npm install | ||
- name: Run tests | ||
run: npx jest test/image-specific/python-3-poetry.spec.ts | ||
env: | ||
SNYK_TOKEN: ${{secrets.SNYK_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters