Skip to content

Commit 12c28f3

Browse files
committed
Go: reorganize CI steps
1 parent 5b1b30a commit 12c28f3

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

.github/workflows/go-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ jobs:
3131
uses: ./go/actions/test
3232
with:
3333
run-code-checks: true
34+
35+
qhelp:
36+
name: Test qhelp conversion
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Compile qhelp files to markdown
40+
shell: bash
41+
run: |
42+
cd go
43+
env QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
44+
- name: Upload qhelp markdown
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: qhelp-markdown
48+
path: go/qhelp-out/**/*.md

go/actions/test/action.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ runs:
2626
shell: bash
2727
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
2828

29-
- name: Build
30-
shell: bash
31-
run: |
32-
bazel run go:create-extractor-pack
33-
34-
- name: Check that all Go code is autoformatted
35-
if: inputs.run-code-checks == 'true'
36-
shell: bash
37-
run: |
38-
cd go
39-
make check-formatting
40-
4129
- name: Check checked-in generated code
4230
if: inputs.run-code-checks == 'true'
4331
shell: bash
@@ -49,19 +37,17 @@ runs:
4937
exit 1
5038
)
5139
52-
- name: Compile qhelp files to markdown
53-
if: inputs.run-code-checks == 'true'
40+
- name: Build
5441
shell: bash
5542
run: |
56-
cd go
57-
env QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
43+
bazel run go:create-extractor-pack
5844
59-
- name: Upload qhelp markdown
60-
if: inputs.run-code-checks == 'true'
61-
uses: actions/upload-artifact@v3
62-
with:
63-
name: qhelp-markdown
64-
path: go/qhelp-out/**/*.md
45+
- name: Check that all Go code is autoformatted
46+
if: inputs.run-code-checks == 'true' && !cancelled()
47+
shell: bash
48+
run: |
49+
cd go
50+
make check-formatting
6551
6652
- name: Cache compilation cache
6753
id: query-cache

0 commit comments

Comments
 (0)