-
Notifications
You must be signed in to change notification settings - Fork 298
187 lines (168 loc) · 5.88 KB
/
ci.yml
File metadata and controls
187 lines (168 loc) · 5.88 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
- master
permissions:
contents: read
actions: read
jobs:
unit-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
go-version: ["oldstable", "stable"]
include:
- os: macos-intel
runsOn: macos-15-intel
- os: macos-arm
runsOn: macos-14
permissions:
contents: read
checks: write
statuses: write
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Check
run: go run . check
working-directory: ./internal/cmd/build
- name: Unit test
run: go run . unit-test
working-directory: ./internal/cmd/build
integration-test-no-cache:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
go-version: ["oldstable", "stable"]
include:
- os: macos-intel
runsOn: macos-15-intel
- os: macos-arm
runsOn: macos-14
permissions:
contents: read
checks: write
statuses: write
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Integration tests (without cache)
run: go run . integration-test -dev-server
working-directory: ./internal/cmd/build
env:
WORKFLOW_CACHE_SIZE: "0"
integration-test-with-cache:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
go-version: ["oldstable", "stable"]
include:
- os: macos-intel
runsOn: macos-15-intel
- os: macos-arm
runsOn: macos-14
permissions:
contents: read
checks: write
statuses: write
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Integration tests (with cache)
run: go run . integration-test -dev-server
working-directory: ./internal/cmd/build
docker-compose-test:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
statuses: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: stable
- name: Docker compose - checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
repository: temporalio/samples-server
path: ./samples-server
- name: Docker compose - start
run: |
cp ./.github/workflows/docker/docker-compose.override.yaml ./samples-server/compose/docker-compose.override.yaml
cp ./.github/workflows/docker/dynamic-config-custom.yaml ./samples-server/compose/dynamicconfig/dynamic-config-custom.yaml
docker compose --project-directory ./samples-server/compose up &
go run ./.github/workflows/wait_for_server.go
- name: Docker compose - integration tests
run: go run . integration-test
env:
# TODO(antlai-temporal): Remove this flag once server 1.27 released.
DISABLE_SERVER_1_27_TESTS: "1"
DISABLE_PRIORITY_TESTS: "1"
DISABLE_STANDALONE_ACTIVITY_TESTS: "1"
DISABLE_NEXUS_CALLER_TIMEOUT_TESTS: "1"
DISABLE_NEW_NEXUS_ERROR_FORMAT_TESTS: "1"
working-directory: ./internal/cmd/build
cloud-test:
strategy:
matrix:
go-version: ["oldstable", "stable"]
fips: [true, false]
# Try to avoid running tests in parallel to avoid workflow ID conflict
max-parallel: 1
# Only supported in non-fork runs, since secrets are not available in forks.
if: ${{ github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-go' }}
runs-on: ubuntu-latest
env:
SERVICE_ADDR: sdk-ci.a2dd6.tmprl.cloud:7233
TEMPORAL_NAMESPACE: sdk-ci.a2dd6
TEMPORAL_CLIENT_CERT: ${{ secrets.TEMPORAL_CLIENT_CERT }}
TEMPORAL_CLIENT_KEY: ${{ secrets.TEMPORAL_CLIENT_KEY }}
GODEBUG: ${{ matrix.fips && 'fips140=on' || '' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Single integration test against cloud
run: 'go test -v --count 1 -p 1 . -run "TestIntegrationSuite/TestBasic$"'
working-directory: test
features-test:
uses: temporalio/features/.github/workflows/go.yaml@main
with:
go-repo-path: ${{github.event.pull_request.head.repo.full_name}}
version: ${{github.event.pull_request.head.ref}}
version-is-repo-ref: true