7
7
- .github/workflows/go-tests-other-os.yml
8
8
- .github/actions/**
9
9
- codeql-workspace.yml
10
- env :
11
- GO_VERSION : ' ~1.22.0'
12
10
13
11
permissions :
14
12
contents : read
15
13
16
14
jobs :
17
- test-mac :
18
- name : Test MacOS
19
- runs-on : macos-latest
15
+ test :
16
+ name : Test
17
+ strategy :
18
+ fail-fast : false
19
+ matrix :
20
+ os : [macos-latest, windows-latest-xl]
21
+ if : matrix.os == 'macos-latest' || github.repository_owner == 'github'
22
+ runs-on : ${{ matrix.os }}
20
23
steps :
21
- - name : Set up Go ${{ env.GO_VERSION }}
22
- uses : actions/setup-go@v5
23
- with :
24
- go-version : ${{ env.GO_VERSION }}
25
- cache : false
26
- id : go
27
-
28
24
- name : Check out code
29
25
uses : actions/checkout@v4
30
26
31
- - name : Set up CodeQL CLI
32
- uses : ./.github/actions/fetch-codeql
33
-
34
- - name : Enable problem matchers in repository
27
+ - name : Get go version
35
28
shell : bash
36
- run : ' find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
37
-
38
- - name : Build
39
- run : |
40
- cd go
41
- make
42
-
43
- - name : Cache compilation cache
44
- id : query-cache
45
- uses : ./.github/actions/cache-query-compilation
46
- with :
47
- key : go-qltest
48
- - name : Test
49
29
run : |
50
- cd go
51
- make test cache="${{ steps.query-cache.outputs.cache-dir }}"
30
+ (
31
+ echo -n "GO_VERSION="
32
+ bazel run @rules_go//go -- version | sed 's/go version go\(\S*\) .*/\1/'
33
+ ) | tee -a "$GITHUB_ENV"
52
34
53
- test-win :
54
- if : github.repository_owner == 'github'
55
- name : Test Windows
56
- runs-on : windows-latest-xl
57
- steps :
58
- - name : Set up Go ${{ env.GO_VERSION }}
35
+ - name : Set up Go
59
36
uses : actions/setup-go@v5
60
37
with :
61
38
go-version : ${{ env.GO_VERSION }}
62
39
cache : false
63
40
id : go
64
41
65
- - name : Check out code
66
- uses : actions/checkout@v4
67
-
68
42
- name : Set up CodeQL CLI
69
43
uses : ./.github/actions/fetch-codeql
70
44
@@ -74,15 +48,13 @@ jobs:
74
48
75
49
- name : Build
76
50
run : |
77
- cd go
78
- make
51
+ bazel run //go:create-extractor-pack
79
52
80
53
- name : Cache compilation cache
81
54
id : query-cache
82
55
uses : ./.github/actions/cache-query-compilation
83
56
with :
84
57
key : go-qltest
85
-
86
58
- name : Test
87
59
run : |
88
60
cd go
0 commit comments