Skip to content

Commit 6b1fc8e

Browse files
committed
ci: prevent double runs and add go vet step
- Only run on push to master (PRs already trigger their own run) - Add concurrency group to cancel outdated runs - Remove random sleep workaround - Add go vet step before tests
1 parent 994b742 commit 6b1fc8e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/test.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Go SDK Integration Tests
22
on:
33
push:
4+
branches: [master]
45
paths-ignore:
56
- 'README.md'
67
pull_request:
@@ -9,6 +10,9 @@ on:
910
schedule:
1011
- cron: '14 14 * * *'
1112

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
1216
jobs:
1317
test:
1418
name: Go SDK Integration Tests
@@ -28,15 +32,15 @@ jobs:
2832
run: |
2933
go mod download
3034
35+
- name: Run go vet
36+
run: |
37+
make vet
38+
3139
- name: Run unit tests
3240
timeout-minutes: 5
3341
run: |
3442
make test
3543
36-
- name: Sleep random seconds to ensure test call are not executed at exactly the same time (push and pr runs)
37-
run: sleep $(( ( RANDOM % 30 ) + 1 ))
38-
shell: bash
39-
4044
- name: Run integration tests
4145
timeout-minutes: 60
4246
env:

0 commit comments

Comments
 (0)