-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (63 loc) · 1.71 KB
/
tests.yml
File metadata and controls
78 lines (63 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
GO_VERSION: "1.24.3"
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go with private modules
uses: ./.github/actions/setup-go-private
with:
go-version: ${{ env.GO_VERSION }}
gh-token: ${{ secrets.GH_PAT }}
- name: Install dependencies
run: go mod download
- name: Run tests
run: make test
build:
uses: ./.github/workflows/docker.yml
with:
push-image: true
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
e2e:
name: E2E Tests
runs-on: ubuntu-latest
needs: [build]
timeout-minutes: 20
permissions:
contents: read
packages: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go with private modules
uses: ./.github/actions/setup-go-private
with:
go-version: ${{ env.GO_VERSION }}
gh-token: ${{ secrets.GH_PAT }}
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull operator image
run: docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: Install Kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Run E2E tests
run: make test-e2e
env:
E2E_SKIP_OPERATOR_BUILD: "true"
E2E_OPERATOR_IMAGE: "ghcr.io/${{ github.repository }}:${{ github.sha }}"