Skip to content

Commit

Permalink
ci(github): isolate container test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Feb 7, 2025
1 parent 989723a commit 06ccf1a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Container Tests

on:

jobs:
integration_test:
name: 🚥 Container test
needs:
- Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: 🚥 Run Container Tests
uses: docker://gcr.io/gcp-runtimes/container-structure-test:v1.15.0
with:
args: test --config container-structure-test.yml --image ghcr.io/${{ github.repository }}:${{ github.sha }} --verbosity debug
14 changes: 0 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Docker Image

on:
push:

jobs:
build:
Expand Down Expand Up @@ -41,16 +40,3 @@ jobs:
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max
build-args: |
SOURCE_COMMIT=${{ github.sha }}
integration_test:
name: 🚥 Integration test
needs:
- Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: 🚥 Run Container Tests
uses: docker://gcr.io/gcp-runtimes/container-structure-test:v1.15.0
with:
args: test --config container-structure-test.yml --image ghcr.io/${{ github.repository }}:${{ github.sha }} --verbosity debug
8 changes: 8 additions & 0 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ env:
HOST: http://172.18.0.1:3000
ZAMMAD_TOKEN: ${{ secrets.ZAMMAD_TOKEN }}
jobs:
build:
uses: ./.github/workflows/docker.yml

container-tests:
needs: build
uses: ./.github/workflows/container.yml

test:
needs: build
strategy:
# don't fail the entire matrix on failure
fail-fast: false
Expand Down

0 comments on commit 06ccf1a

Please sign in to comment.