Skip to content

Commit 551d33a

Browse files
shaxbeeZibi Mandziejewicz
authored andcommitted
feat: e2e test
1 parent bd745ed commit 551d33a

File tree

5 files changed

+84
-32
lines changed

5 files changed

+84
-32
lines changed
Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,9 @@
1-
name: ci
1+
name: Build
22

33
on:
44
push:
55

66
jobs:
7-
verify:
8-
name: Verify
9-
runs-on: ubuntu-latest
10-
env:
11-
CODECOV_FILE: "build/coverage.xml"
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
- name: Setup Go
16-
uses: actions/setup-go@v5
17-
with:
18-
go-version: '1.24'
19-
- name: Generate
20-
run: make generate format
21-
- name: No changed files
22-
run: git diff --name-status --exit-code
23-
- name: Lint
24-
run: make lint
25-
- name: Integration test
26-
run: make integration-test coverage
27-
- name: Code Coverage Report
28-
uses: irongut/CodeCoverageSummary@v1.3.0
29-
with:
30-
filename: ${{ env.CODECOV_FILE }}
31-
badge: true
32-
format: markdown
33-
output: both
347
image-build:
358
name: Image Build
369
runs-on: ubuntu-latest

.github/workflows/verify.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Verify
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
verify:
8+
name: Verify
9+
runs-on: ubuntu-latest
10+
env:
11+
CODECOV_FILE: build/coverage.xml
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.24'
19+
- name: Generate
20+
run: make generate format
21+
- name: No changed files
22+
run: git diff --name-status --exit-code
23+
- name: Lint
24+
run: make lint
25+
- name: Integration test
26+
run: make integration-test coverage
27+
- name: Archive coverage report
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: coverage
31+
path: ${{ env.CODECOV_FILE }}
32+
e2e:
33+
name: E2E Test
34+
needs:
35+
- verify
36+
runs-on: ubuntu-latest
37+
env:
38+
CODECOV_FILE: build/coverage.e2e.xml
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
- name: Download image tags
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: images
46+
- name: Create Kind cluster
47+
uses: helm/kind-action@v1
48+
- name: Bootstrap
49+
run: kubectl apply --enable-helm -k config/bootstrap
50+
- name: Deploy
51+
uses: hiberbee/github-action-skaffold@1.27.0
52+
with:
53+
skaffold-version: 2.14.1
54+
command: deploy
55+
images: images.json
56+
- name: Archive coverage report
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: coverage
60+
path: ${{ env.CODECOV_FILE }}
61+
coverage:
62+
name: Coverage Report
63+
needs:
64+
- verify
65+
- e2e
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Download coverage reports
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: coverage
72+
- name: Generate
73+
uses: irongut/CodeCoverageSummary@v1.3.0
74+
with:
75+
filename: build/coverage.xml,build/coverage.e2e.xml
76+
badge: true
77+
format: markdown
78+
output: both

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ kustomize build --enable-helm config/bootstrap | kubectl apply -f -
3232

3333
```
3434
docker build --tag ghcr.io/agoda-com/etcd .
35-
```
36-
37-
```
3835
kubectl apply -k config/default
3936
```
4037

config/default/kustomization.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ kind: Kustomization
33
namespace: etcd
44
resources:
55
- ../rbac
6-
- ../base
6+
- ../base
7+
- namespace.yaml

config/default/namespace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Namespace
2+
metadata:
3+
name: etcd

0 commit comments

Comments
 (0)