Skip to content

Commit 06ccf1a

Browse files
committed
ci(github): isolate container test workflow
1 parent 989723a commit 06ccf1a

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

.github/workflows/container.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Container Tests
2+
3+
on:
4+
5+
jobs:
6+
integration_test:
7+
name: 🚥 Container test
8+
needs:
9+
- Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- run: docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
14+
- name: 🚥 Run Container Tests
15+
uses: docker://gcr.io/gcp-runtimes/container-structure-test:v1.15.0
16+
with:
17+
args: test --config container-structure-test.yml --image ghcr.io/${{ github.repository }}:${{ github.sha }} --verbosity debug

.github/workflows/docker.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Docker Image
22

33
on:
4-
push:
54

65
jobs:
76
build:
@@ -41,16 +40,3 @@ jobs:
4140
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max
4241
build-args: |
4342
SOURCE_COMMIT=${{ github.sha }}
44-
45-
integration_test:
46-
name: 🚥 Integration test
47-
needs:
48-
- Build
49-
runs-on: ubuntu-latest
50-
steps:
51-
- uses: actions/checkout@v4
52-
- run: docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
53-
- name: 🚥 Run Container Tests
54-
uses: docker://gcr.io/gcp-runtimes/container-structure-test:v1.15.0
55-
with:
56-
args: test --config container-structure-test.yml --image ghcr.io/${{ github.repository }}:${{ github.sha }} --verbosity debug

.github/workflows/end-to-end.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ env:
2323
HOST: http://172.18.0.1:3000
2424
ZAMMAD_TOKEN: ${{ secrets.ZAMMAD_TOKEN }}
2525
jobs:
26+
build:
27+
uses: ./.github/workflows/docker.yml
28+
29+
container-tests:
30+
needs: build
31+
uses: ./.github/workflows/container.yml
32+
2633
test:
34+
needs: build
2735
strategy:
2836
# don't fail the entire matrix on failure
2937
fail-fast: false

0 commit comments

Comments
 (0)