-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (149 loc) · 4.46 KB
/
Copy pathci.yml
File metadata and controls
162 lines (149 loc) · 4.46 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
- uses: moonrepo/setup-rust@v1
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
tests-unit:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24.x', '1.25.x']
env:
GOEXPERIMENT: ${{ matrix.go-version == '1.24.x' && 'synctest' || '' }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- uses: taiki-e/install-action@cargo-nextest
- uses: moonrepo/setup-rust@v1
- name: Run unit and discovery tests
run: cargo nextest run --lib -E 'not test(~integration_tests)'
working-directory: go-runner
env:
CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }}
tests-integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ['1.24.x', '1.25.x']
shard:
- name: hugo
filter: "test(~hugo)"
- name: caddy
filter: "test(~caddy)"
- name: large
filter: "test(~fzf) | test(~opentelemetry) | test(~golang_benchmarks)"
- name: medium
filter: "test(~zerolog) | test(~zap) | test(~fuego) | test(~cli_runtime) | test(~quic)"
- name: examples
filter: "test(~example)"
env:
GOEXPERIMENT: ${{ matrix.go-version == '1.24.x' && 'synctest' || '' }}
name: integration (${{ matrix.go-version }}, ${{ matrix.shard.name }})
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- uses: taiki-e/install-action@cargo-nextest
- uses: moonrepo/setup-rust@v1
- name: Run integration tests (${{ matrix.shard.name }})
run: cargo nextest run -E '${{ matrix.shard.filter }}'
working-directory: go-runner
env:
CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }}
verify-fork-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
- uses: pre-commit/action@v3.0.1
- name: Run fork.sh scripts and verify no diffs
run: |
cd testing
./fork.sh 1.25.4
cd ..
if ! git diff --exit-code testing/ > /dev/null 2>&1; then
exit 1
fi
compat-integration-test-walltime:
runs-on: codspeed-macro
strategy:
matrix:
target: [example, example/compat, example/timing, example/very/nested/module, example/external]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
- uses: moonrepo/setup-rust@v1
with:
cache-target: release
- name: Run the benchmarks
uses: CodSpeedHQ/action@main
env:
CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }}
with:
mode: walltime
working-directory: example
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. ${{ matrix.target }}
go-runner-benchmarks:
runs-on: codspeed-macro
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
bins: cargo-codspeed
- uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Build the benchmark target(s)
run: cargo codspeed build -m walltime
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: walltime
run: cargo codspeed run
check:
runs-on: ubuntu-latest
if: always()
needs:
- lint
- tests-unit
- tests-integration
- verify-fork-scripts
- compat-integration-test-walltime
- go-runner-benchmarks
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJson( needs ) }}