-
Notifications
You must be signed in to change notification settings - Fork 41
69 lines (61 loc) · 2.25 KB
/
ci.yaml
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
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
jobs:
build-test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest, ubuntu-arm]
include:
- os: ubuntu-latest
checkGenCodeTarget: true
cloudTestTarget: true
- os: ubuntu-arm
runsOn: buildjet-4vcpu-ubuntu-2204-arm
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Create junit-xml directory
run: mkdir junit-xml
- name: Test
run: gotestsum --junitfile junit-xml/${{matrix.os}}.xml -- ./...
- name: 'Upload junit-xml artifacts'
uses: actions/upload-artifact@v4
if: always()
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.os}}
path: junit-xml
retention-days: 14
- name: Regen code, confirm unchanged
if: ${{ matrix.checkGenCodeTarget }}
run: |
go run ./temporalcli/internal/cmd/gen-commands
git diff --exit-code
- name: Test cloud
# Only supported in non-fork runs, since secrets are not available in forks
if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/cli') }}
env:
TEMPORAL_ADDRESS: ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}.tmprl.cloud:7233
TEMPORAL_NAMESPACE: ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
TEMPORAL_TLS_CERT: client.crt
TEMPORAL_TLS_CERT_CONTENT: ${{ secrets.TEMPORAL_CLIENT_CERT }}
TEMPORAL_TLS_KEY: client.key
TEMPORAL_TLS_KEY_CONTENT: ${{ secrets.TEMPORAL_CLIENT_KEY }}
shell: bash
run: |
printf '%s\n' "$TEMPORAL_TLS_CERT_CONTENT" >> client.crt
printf '%s\n' "$TEMPORAL_TLS_KEY_CONTENT" >> client.key
go run ./cmd/temporal workflow list --limit 2