Skip to content

Commit ed28738

Browse files
authored
fix: e2e test role binding (#6)
Signed-off-by: Zbigniew Mandziejewicz <shaxbee@gmail.com>
1 parent 18ae471 commit ed28738

File tree

2 files changed

+35
-38
lines changed

2 files changed

+35
-38
lines changed

.github/workflows/ci.yaml

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,35 @@ 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: Upload coverage reports to Codecov
28+
uses: codecov/codecov-action@v5
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }}
31+
files: ${{ env.CODECOV_FILE }}
32+
733
image-build:
834
name: Image Build
35+
if: github.actor!= 'dependabot-preview[bot]'
936
runs-on: ubuntu-latest
1037
steps:
1138
- name: Checkout
@@ -36,35 +63,9 @@ jobs:
3663
name: images
3764
path: build/images.json
3865

39-
verify:
40-
name: Verify
41-
runs-on: ubuntu-latest
42-
env:
43-
CODECOV_FILE: build/coverage.xml
44-
steps:
45-
- name: Checkout
46-
uses: actions/checkout@v4
47-
- name: Setup Go
48-
uses: actions/setup-go@v5
49-
with:
50-
go-version: '1.24'
51-
- name: Generate
52-
run: make generate format
53-
- name: No changed files
54-
run: git diff --name-status --exit-code
55-
- name: Lint
56-
run: make lint
57-
- name: Integration test
58-
run: make integration-test coverage
59-
- name: Upload coverage reports to Codecov
60-
uses: codecov/codecov-action@v5
61-
with:
62-
token: ${{ secrets.CODECOV_TOKEN }}
63-
files: ${{ env.CODECOV_FILE }}
6466
e2e:
6567
name: E2E Test
6668
if: false
67-
# if: github.actor!= 'dependabot-preview[bot]'
6869
needs:
6970
- verify
7071
- image-build
@@ -92,19 +93,15 @@ jobs:
9293
kubectl get namespace sandbox 2>/dev/null || kubectl create namespace sandbox
9394
mkdir build/
9495
skaffold config set kind-disable-load true
95-
- name: Download image tags
96-
uses: actions/download-artifact@v4
97-
with:
98-
name: images
99-
path: build
10096
- name: Deploy
101-
run: skaffold deploy --profile e2e --build-artifacts=build/images.json
97+
run: skaffold run --profile e2e
10298
- name: Run E2E tests
10399
run: skaffold verify --namespace sandbox --build-artifacts=build/images.json
104100
- name: Fetch coverage
105101
run: make fetch-coverage
106-
- name: Archive coverage report
107-
uses: actions/upload-artifact@v4
102+
- name: Upload coverage reports to Codecov
103+
uses: codecov/codecov-action@v5
108104
with:
109-
name: coverage-e2e
110-
path: ${{ env.CODECOV_FILE }}
105+
name: e2e
106+
token: ${{ secrets.CODECOV_TOKEN }}
107+
files: ${{ env.CODECOV_FILE }}

config/e2e/test-service-account.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ metadata:
44
name: etcd-test
55
---
66
apiVersion: rbac.authorization.k8s.io/v1
7-
kind: ClusterRoleBinding
7+
kind: RoleBinding
88
metadata:
99
name: etcd-test
1010
roleRef:
1111
apiGroup: rbac.authorization.k8s.io
12-
kind: ClusterRole
12+
kind: Role
1313
name: etcd-test
1414
subjects:
1515
- kind: ServiceAccount

0 commit comments

Comments
 (0)