forked from temporalio/sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (76 loc) · 2.77 KB
/
ci.yml
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
name: Continuous Integration
on:
pull_request:
push:
branches:
- master
jobs:
build-and-test:
strategy:
matrix:
go-version: ["1.20", "1.21"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check and unit test
run: make check unit-test
- name: Clone Temporal Docker compose
uses: actions/checkout@v3
with:
repository: temporalio/docker-compose
path: ./docker-compose
- name: Start Temporal server
run: |
cp ./.github/workflows/docker/docker-compose.override.yaml ./docker-compose/docker-compose.override.yaml
cp ./.github/workflows/docker/dynamic-config-custom.yaml ./docker-compose/dynamicconfig/dynamic-config-custom.yaml
docker-compose --project-directory ./docker-compose up &
go run ./.github/workflows/wait_for_server.go
- name: Integration tests (without cache)
run: make integration-test-zero-cache
- name: Integration tests (with cache)
run: make integration-test-normal-cache
- name: Merge coverage files
id: merge-coverage-files
run: |
COVERAGE_FILE="$(mktemp)"
echo "COVERAGE_FILE=$COVERAGE_FILE" >> "$GITHUB_OUTPUT"
make merge-coverage > "$COVERAGE_FILE"
- name: Upload coverage
continue-on-error: true
uses: coverallsapp/github-action@v2
with:
file: ${{ steps.merge-coverage-files.outputs.COVERAGE_FILE }}
format: golang
cloud-test:
strategy:
matrix:
go-version: ["1.20", "1.21"]
# 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 }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-go@v4
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