-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (40 loc) · 1.06 KB
/
test.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
name: Go SDK Integration Tests
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
schedule:
- cron: '14 14 * * *'
jobs:
test:
name: Go SDK Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: '1.18'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.3
- name: Get dependencies
run: |
go mod download
- name: Run unit tests
timeout-minutes: 5
run: |
make test
- name: Sleep random seconds to ensure test call are not executed at exactly the same time (push and pr runs)
run: sleep $(( ( RANDOM % 30 ) + 1 ))
shell: bash
- name: Run integration tests
timeout-minutes: 60
env:
CLOUDSCALE_API_TOKEN: ${{ secrets.CLOUDSCALE_TOKEN }}
if: env.CLOUDSCALE_API_TOKEN != null
run: |
make integration