-
Notifications
You must be signed in to change notification settings - Fork 197
103 lines (95 loc) · 2.39 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: ci
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.asciidoc'
pull_request:
paths-ignore:
- '**.md'
- '**.asciidoc'
# limit the access of the generated GITHUB_TOKEN
permissions:
contents: read
jobs:
precheck:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Precheck
run: make precheck
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
go-version: [oldstable, stable]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
cache-dependency-path: '**/go.sum'
- name: Unit tests
run: make test
check-update-modules:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Check Update Modules Command
run: make update-modules
coverage:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Integration tests
run: |
./scripts/docker-compose-testing run -T --rm trace-context-harness
./scripts/docker-compose-testing up -d --build
./scripts/docker-compose-testing run -T --rm go-agent-tests make coverage GOFLAGS=-v
test-windows:
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Unit tests
run: go test -v ./...
test-macos:
runs-on: macos-12
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: stable
cache: true
cache-dependency-path: '**/go.sum'
- name: Unit tests
run: make test