Skip to content

Commit 8f21ba0

Browse files
authored
Merge pull request #1144 from rabbitmq/version-go-in-prom-tests
Explicitly install a known golang version.
2 parents 7c20c4f + 0918e6d commit 8f21ba0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/prometheus-rules.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ on:
55
- main
66
paths:
77
- observability/prometheus/rules/**/*.y*ml
8+
9+
env:
10+
GO_VERSION: 1.19.1
11+
812
jobs:
913
rules:
1014
runs-on: ubuntu-latest
1115
steps:
16+
- name: Install Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: ${{ env.GO_VERSION }}
1220
- uses: actions/checkout@v2
1321
- name: Create Prometheus rule file
1422
run: |
15-
export GOPATH=$HOME/go
16-
export PATH=$PATH:$GOPATH/bin
1723
make install-tools
1824
cd observability/prometheus/
1925
echo "# This file got auto-generated by GitHub workflow '$GITHUB_WORKFLOW'" > rule-file.yml
@@ -31,8 +37,6 @@ jobs:
3137
yq eval-all --inplace --no-colors --prettyPrint "$append_rabbitmq_rules" rule-file.yml rules/rabbitmq/recording-rules.yml
3238
- name: Check Prometheus rule file
3339
run: |
34-
export GOPATH=$HOME/go
35-
export PATH=$PATH:$GOPATH/bin
3640
# need to use @main because of https://github.com/prometheus/prometheus/issues/8586#issuecomment-796976710
3741
GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@main
3842
promtool check rules observability/prometheus/rule-file.yml

0 commit comments

Comments
 (0)