11name : " Go: Run Tests"
22on :
3+ push :
4+ paths :
5+ - " go/**"
6+ - .github/workflows/go-tests.yml
7+ - .github/actions/fetch-codeql/action.yml
8+ - .github/actions/cache-query-compilation/action.yml
9+ - codeql-workspace.yml
10+ branches :
11+ - main
12+ - " rc/*"
313 pull_request :
414 paths :
515 - " go/**"
616 - .github/workflows/go-tests.yml
717 - .github/actions/fetch-codeql/action.yml
18+ - .github/actions/cache-query-compilation/action.yml
819 - codeql-workspace.yml
920jobs :
1021 test-linux :
1122 name : Test Linux (Ubuntu)
12- runs-on : ubuntu-latest
23+ runs-on : ubuntu-latest-xl
1324 steps :
1425 - name : Set up Go 1.19
1526 uses : actions/setup-go@v3
3243 cd go
3344 make
3445
35- - name : Check that all QL and Go code is autoformatted
46+ - name : Check that all Go code is autoformatted
3647 run : |
3748 cd go
3849 make check-formatting
@@ -48,67 +59,13 @@ jobs:
4859 name : qhelp-markdown
4960 path : go/qhelp-out/**/*.md
5061
51- - name : Test
52- run : |
53- cd go
54- make test
55-
56- test-mac :
57- name : Test MacOS
58- runs-on : macos-latest
59- steps :
60- - name : Set up Go 1.19
61- uses : actions/setup-go@v3
62- with :
63- go-version : 1.19
64- id : go
65-
66- - name : Check out code
67- uses : actions/checkout@v2
68-
69- - name : Set up CodeQL CLI
70- uses : ./.github/actions/fetch-codeql
71-
72- - name : Enable problem matchers in repository
73- shell : bash
74- run : ' find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
75-
76- - name : Build
77- run : |
78- cd go
79- make
80-
81- - name : Test
82- run : |
83- cd go
84- make test
85-
86- test-win :
87- name : Test Windows
88- runs-on : windows-2019
89- steps :
90- - name : Set up Go 1.19
91- uses : actions/setup-go@v3
62+ - name : Cache compilation cache
63+ id : query-cache
64+ uses : ./.github/actions/cache-query-compilation
9265 with :
93- go-version : 1.19
94- id : go
95-
96- - name : Check out code
97- uses : actions/checkout@v2
98-
99- - name : Set up CodeQL CLI
100- uses : ./.github/actions/fetch-codeql
101-
102- - name : Enable problem matchers in repository
103- shell : bash
104- run : ' find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
105-
106- - name : Build
107- run : |
108- cd go
109- make
110-
66+ key : go-qltest
67+
11168 - name : Test
11269 run : |
11370 cd go
114- make test
71+ make test cache="${{ steps.query-cache.outputs.cache-dir }}"
0 commit comments