8
8
test_go :
9
9
name : Go tests
10
10
runs-on : ubuntu-latest
11
- # Whenever the Go version is updated here, .promu.yml
12
- # should also be updated.
13
11
container :
14
- image : quay.io/prometheus/golang-builder:1.21-base
12
+ # Whenever the Go version is updated here, .promu.yml
13
+ # should also be updated.
14
+ image : quay.io/prometheus/golang-builder:1.22-base
15
15
steps :
16
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
17
17
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
18
18
- uses : ./.github/promci/actions/setup_environment
19
- - run : make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
20
- - run : go test ./tsdb/ -test.tsdb-isolation=false
21
- - run : go test --tags=stringlabels ./...
22
- - run : GOARCH=386 go test ./cmd/prometheus
19
+ - run : make GOOPTS=--tags=stringlabels GO_ONLY=1 SKIP_GOLANGCI_LINT=1
20
+ - run : go test --tags=stringlabels ./tsdb/ -test.tsdb-isolation=false
23
21
- run : make -C documentation/examples/remote_storage
24
22
- run : make -C documentation/examples
23
+
24
+ test_go_more :
25
+ name : More Go tests
26
+ runs-on : ubuntu-latest
27
+ container :
28
+ image : quay.io/prometheus/golang-builder:1.22-base
29
+ steps :
30
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
31
+ - uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
32
+ - uses : ./.github/promci/actions/setup_environment
33
+ - run : go test --tags=dedupelabels ./...
34
+ - run : GOARCH=386 go test ./cmd/prometheus
25
35
- uses : ./.github/promci/actions/check_proto
26
36
with :
27
37
version : " 3.15.8"
28
38
39
+ test_go_oldest :
40
+ name : Go tests with previous Go version
41
+ runs-on : ubuntu-latest
42
+ container :
43
+ # The go version in this image should be N-1 wrt test_go.
44
+ image : quay.io/prometheus/golang-builder:1.21-base
45
+ steps :
46
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
47
+ - run : make build
48
+ # Don't run NPM build; don't run race-detector.
49
+ - run : make test GO_ONLY=1 test-flags=""
50
+
29
51
test_ui :
30
52
name : UI tests
31
53
runs-on : ubuntu-latest
32
54
# Whenever the Go version is updated here, .promu.yml
33
55
# should also be updated.
34
56
container :
35
- image : quay.io/prometheus/golang-builder:1.21 -base
57
+ image : quay.io/prometheus/golang-builder:1.22 -base
36
58
37
59
steps :
38
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
60
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
39
61
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
40
62
- uses : ./.github/promci/actions/setup_environment
41
63
with :
@@ -52,36 +74,24 @@ jobs:
52
74
name : Go tests on Windows
53
75
runs-on : windows-latest
54
76
steps :
55
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
56
- - uses : actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1 .0
77
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
78
+ - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0 .0
57
79
with :
58
- go-version : 1.21 .x
80
+ go-version : 1.22 .x
59
81
- run : |
60
82
$TestTargets = go list ./... | Where-Object { $_ -NotMatch "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"}
61
83
go test $TestTargets -vet=off -v
62
84
shell: powershell
63
85
64
- test_golang_oldest :
65
- name : Go tests with previous Go version
66
- runs-on : ubuntu-latest
67
- # The go verson in this image should be N-1 wrt test_go.
68
- container :
69
- image : quay.io/prometheus/golang-builder:1.20-base
70
- steps :
71
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
72
- - run : make build
73
- - run : go test ./tsdb/...
74
- - run : go test ./tsdb/ -test.tsdb-isolation=false
75
-
76
86
test_mixins :
77
87
name : Mixins tests
78
88
runs-on : ubuntu-latest
79
89
# Whenever the Go version is updated here, .promu.yml
80
90
# should also be updated.
81
91
container :
82
- image : quay.io/prometheus/golang-builder:1.20 -base
92
+ image : quay.io/prometheus/golang-builder:1.22 -base
83
93
steps :
84
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
94
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
85
95
- run : go install ./cmd/promtool/.
86
96
- run : go install github.com/google/go-jsonnet/cmd/jsonnet@latest
87
97
- run : go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
@@ -104,7 +114,7 @@ jobs:
104
114
matrix :
105
115
thread : [ 0, 1, 2 ]
106
116
steps :
107
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
117
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
108
118
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
109
119
- uses : ./.github/promci/actions/build
110
120
with :
@@ -127,32 +137,45 @@ jobs:
127
137
# Whenever the Go version is updated here, .promu.yml
128
138
# should also be updated.
129
139
steps :
130
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
140
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
131
141
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
132
142
- uses : ./.github/promci/actions/build
133
143
with :
134
144
parallelism : 12
135
145
thread : ${{ matrix.thread }}
146
+ check_generated_parser :
147
+ name : Check generated parser
148
+ runs-on : ubuntu-latest
149
+ steps :
150
+ - name : Checkout repository
151
+ uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
152
+ - name : Install Go
153
+ uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
154
+ with :
155
+ cache : false
156
+ go-version : 1.22.x
157
+ - name : Run goyacc and check for diff
158
+ run : make install-goyacc check-generated-parser
136
159
golangci :
137
160
name : golangci-lint
138
161
runs-on : ubuntu-latest
139
162
steps :
140
163
- name : Checkout repository
141
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
164
+ uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
142
165
- name : Install Go
143
- uses : actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1 .0
166
+ uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0 .0
144
167
with :
145
168
cache : false
146
- go-version : 1.21 .x
169
+ go-version : 1.22 .x
147
170
- name : Install snmp_exporter/generator dependencies
148
171
run : sudo apt-get update && sudo apt-get -y install libsnmp-dev
149
172
if : github.repository == 'prometheus/snmp_exporter'
150
173
- name : Lint
151
- uses : golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7 .0
174
+ uses : golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0 .0
152
175
with :
153
176
args : --verbose
154
177
# Make sure to sync this with Makefile.common and scripts/golangci-lint.yml.
155
- version : v1.55 .2
178
+ version : v1.56 .2
156
179
fuzzing :
157
180
uses : ./.github/workflows/fuzzing.yml
158
181
if : github.event_name == 'pull_request'
@@ -162,10 +185,10 @@ jobs:
162
185
publish_main :
163
186
name : Publish main branch artifacts
164
187
runs-on : ubuntu-latest
165
- needs : [test_ui, test_go, test_windows, golangci, codeql, build_all]
188
+ needs : [test_ui, test_go, test_go_more, test_go_oldest, test_windows, golangci, codeql, build_all]
166
189
if : github.event_name == 'push' && github.event.ref == 'refs/heads/main'
167
190
steps :
168
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
191
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
169
192
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
170
193
- uses : ./.github/promci/actions/publish_main
171
194
with :
@@ -176,10 +199,10 @@ jobs:
176
199
publish_release :
177
200
name : Publish release artefacts
178
201
runs-on : ubuntu-latest
179
- needs : [test_ui, test_go, test_windows, golangci, codeql, build_all]
202
+ needs : [test_ui, test_go, test_go_more, test_go_oldest, test_windows, golangci, codeql, build_all]
180
203
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v2.')
181
204
steps :
182
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
205
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
183
206
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
184
207
- uses : ./.github/promci/actions/publish_release
185
208
with :
@@ -194,14 +217,14 @@ jobs:
194
217
needs : [test_ui, codeql]
195
218
steps :
196
219
- name : Checkout
197
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
220
+ uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
198
221
- uses : prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
199
222
- name : Install nodejs
200
- uses : actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
223
+ uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
201
224
with :
202
225
node-version-file : " web/ui/.nvmrc"
203
226
registry-url : " https://registry.npmjs.org"
204
- - uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
227
+ - uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
205
228
with :
206
229
path : ~/.npm
207
230
key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
0 commit comments