1- name : ci
1+ name : CI
22
33on :
44 push :
55
66jobs :
7+ image-build :
8+ name : Image Build
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+ - name : Set up QEMU
14+ uses : docker/setup-qemu-action@v3
15+ - name : Set up Docker Buildx
16+ uses : docker/setup-buildx-action@v3
17+ with :
18+ platforms : linux/amd64,linux/arm64
19+ - name : Login to GitHub Container Registry
20+ uses : docker/login-action@v3
21+ with :
22+ registry : ghcr.io
23+ username : ${{ github.actor }}
24+ password : ${{ secrets.GITHUB_TOKEN }}
25+ - name : Build images
26+ uses : hiberbee/github-action-skaffold@1.27.0
27+ with :
28+ command : build
29+ file-output : images.json
30+ - name : Archive image tags
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : images
34+ path : images.json
735 verify :
836 name : Verify
937 runs-on : ubuntu-latest
1038 env :
11- CODECOV_FILE : " build/coverage.xml"
39+ CODECOV_FILE : build/coverage.xml
1240 steps :
1341 - name : Checkout
1442 uses : actions/checkout@v4
@@ -24,39 +52,69 @@ jobs:
2452 run : make lint
2553 - name : Integration test
2654 run : make integration-test coverage
27- - name : Code Coverage Report
28- uses : irongut/CodeCoverageSummary@v1.3.0
55+ - name : Archive coverage report
56+ uses : actions/upload-artifact@v4
2957 with :
30- filename : ${{ env.CODECOV_FILE }}
31- badge : true
32- format : markdown
33- output : both
34- image-build :
35- name : Image Build
58+ name : coverage
59+ path : ${{ env.CODECOV_FILE }}
60+ e2e :
61+ name : E2E Test
62+ needs :
63+ - verify
64+ - image-build
3665 runs-on : ubuntu-latest
66+ env :
67+ CODECOV_FILE : build/coverage.e2e.xml
68+ SKAFFOLD_NAMESPACE : sandbox
69+ SKAFFOLD_RUN_ID : e2e-test
3770 steps :
3871 - name : Checkout
3972 uses : actions/checkout@v4
40- - name : Set up QEMU
41- uses : docker/setup-qemu-action@v3
42- - name : Set up Docker Buildx
43- uses : docker/setup-buildx-action@v3
73+ - name : Download image tags
74+ uses : actions/download-artifact@v4
4475 with :
45- platforms : linux/amd64,linux/arm64
46- - name : Login to GitHub Container Registry
47- uses : docker/login-action@v3
76+ name : images
77+ - name : Create Kind cluster
78+ uses : helm/kind-action@v1
79+ - name : Bootstrap
80+ run : |
81+ kustomize build --enable-helm config/bootstrap | kubectl apply -f -
82+ kubectl --namespace cert-manager wait --for=condition=Available deployment/cert-manager
83+ kubectl get namespace sandbox || kubectl create namespace sandbox
84+ - name : Deploy
85+ uses : hiberbee/github-action-skaffold@1.27.0
4886 with :
49- registry : ghcr.io
50- username : ${{ github.actor }}
51- password : ${{ secrets.GITHUB_TOKEN }}
52- - name : Build images
87+ command : deploy
88+ images : images.json
89+ profile : e2e
90+ - name : Run e2e tests
5391 uses : hiberbee/github-action-skaffold@1.27.0
5492 with :
55- skaffold-version : 2.14.1
56- command : build
57- file-output : images.json
58- - name : Archive image tags
93+ command : verify
94+ images : images.json
95+ profile : e2e
96+ - name : Fetch coverage
97+ run : make fetch-coverage
98+ - name : Archive coverage report
5999 uses : actions/upload-artifact@v4
60100 with :
61- name : images
62- path : images.json
101+ name : coverage
102+ path : ${{ env.CODECOV_FILE }}
103+ coverage :
104+ name : Coverage Report
105+ needs :
106+ - verify
107+ - e2e
108+ runs-on : ubuntu-latest
109+ steps :
110+ - name : Download coverage reports
111+ uses : actions/download-artifact@v4
112+ with :
113+ name : coverage
114+ - name : Generate
115+ uses : irongut/CodeCoverageSummary@v1.3.0
116+ with :
117+ filename : build/coverage.xml,build/coverage.e2e.xml
118+ badge : true
119+ format : markdown
120+ output : both
0 commit comments