forked from temporalio/temporal-worker-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (90 loc) · 2.38 KB
/
test-integration.yml
File metadata and controls
113 lines (90 loc) · 2.38 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Integration Tests
on:
push:
branches: [ main ]
pull_request:
jobs:
test-integration:
name: Run Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Install Temporal CLI
run: |
curl -sSf https://temporal.download/cli.sh | sh
echo "$HOME/.temporalio/bin" >> "$GITHUB_PATH"
- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 'v3.14.3'
- name: Install controller-gen
run: |
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.2
- name: Install envtest
run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
- name: Download dependencies
run: go mod download
- name: Run integration tests
run: make test-integration
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
cover.out
bin/
retention-days: 7
unit-test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Download dependencies
run: go mod download
- name: Run unit tests
run: make test-unit
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: |
cover.out
bin/
retention-days: 7
go-vet:
name: Run Go Vet
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Download dependencies
run: go mod download
- name: Run go vet
run: go vet ./...