Skip to content

Commit 86d6b8e

Browse files
committed
Go: put back go setup
1 parent 0f387ee commit 86d6b8e

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

.github/workflows/go-tests.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ on:
1616
- .github/actions/**
1717
- codeql-workspace.yml
1818

19-
env:
20-
GO_VERSION: '~1.22.0'
21-
2219
permissions:
2320
contents: read
2421

@@ -31,6 +28,21 @@ jobs:
3128
- name: Check out code
3229
uses: actions/checkout@v4
3330

31+
- name: Get go version
32+
shell: bash
33+
run: |
34+
(
35+
echo -n "GO_VERSION="
36+
bazel run @rules_go//go -- version | sed 's/go version go\(\S*\) .*/\1/'
37+
) | tee -a "$GITHUB_ENV"
38+
39+
- name: Set up Go
40+
uses: actions/setup-go@v5
41+
with:
42+
go-version: ${{ env.GO_VERSION }}
43+
cache: false
44+
id: go
45+
3446
- name: Set up CodeQL CLI
3547
uses: ./.github/actions/fetch-codeql
3648

@@ -42,24 +54,6 @@ jobs:
4254
run: |
4355
bazel run //go:create-extractor-pack
4456
45-
- name: Cache compilation cache
46-
id: query-cache
47-
uses: ./.github/actions/cache-query-compilation
48-
with:
49-
key: go-qltest
50-
51-
- name: Test
52-
run: |
53-
cd go
54-
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
55-
56-
check-code:
57-
name: Check code
58-
runs-on: ubuntu-latest
59-
steps:
60-
- name: Check out code
61-
uses: actions/checkout@v4
62-
6357
- name: Check that all Go code is autoformatted
6458
run: |
6559
cd go
@@ -84,3 +78,14 @@ jobs:
8478
with:
8579
name: qhelp-markdown
8680
path: go/qhelp-out/**/*.md
81+
82+
- name: Cache compilation cache
83+
id: query-cache
84+
uses: ./.github/actions/cache-query-compilation
85+
with:
86+
key: go-qltest
87+
88+
- name: Test
89+
run: |
90+
cd go
91+
make test cache="${{ steps.query-cache.outputs.cache-dir }}"

0 commit comments

Comments
 (0)