Skip to content

Commit

Permalink
debug wf
Browse files Browse the repository at this point in the history
  • Loading branch information
criemen committed Oct 21, 2024
1 parent ef71cf5 commit 5ddccd0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 74 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/go-tests-other-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,28 @@ on:
- MODULE.bazel
- .bazelrc
- misc/bazel/**

push:
branches:
- criemen/debug
permissions:
contents: read

jobs:
test-mac:
name: Test MacOS
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run tests
uses: ./go/actions/test

test-win:
if: github.repository_owner == 'github'
name: Test Windows
runs-on: windows-latest-xl
steps:
- name: Check out code
uses: actions/checkout@v4
with:
sparse-checkout: go

- name: dump env bash
shell: bash
run: |
where bazel
declare -px
bazel version
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand All @@ -47,14 +43,6 @@ jobs:
run: |
where bazel
declare -px
- name: test1
run: |
C:\npm\prefix\bazel version
- name: test2
run: |
C:\ProgramData\Chocolatey\bin\bazel.exe version
- name: test3
run: |
C:\npm\prefix\bazelisk version
bazel version
- name: Run tests
uses: ./go/actions/test
4 changes: 1 addition & 3 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ extractor:
where bazel
bazel version
pwd
bazel run :go-installer

gen:
export
where bazel
bazel version
pwd
bazel run :gen

build/stats/src.stamp:
mkdir -p $(@D)/src
Expand All @@ -56,7 +54,7 @@ test: all build/testdb/check-upgrade-path
# codeql test run -j0 ql/test --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache)
# use GOOS=linux because GOOS=darwin GOARCH=386 is no longer supported
# env GOOS=linux GOARCH=386 codeql$(EXE) test run -j0 ql/test/query-tests/Security/CWE-681 --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache)
cd extractor; bazel test ...
cd extractor; bazel version; bazel test ...
bash extractor-smoke-test/test.sh || (echo "Extractor smoke test FAILED"; exit 1)

.PHONY: build/testdb/check-upgrade-path
Expand Down
52 changes: 1 addition & 51 deletions go/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,13 @@ runs:
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-test-version }}
cache: false
id: go

- name: Set up CodeQL CLI
uses: ./.github/actions/fetch-codeql

- name: Enable problem matchers in repository
shell: bash
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'

- name: Check checked-in generated code
if: inputs.run-code-checks == 'true'
shell: bash
run: |
declare -px
where bazel
bazel run go:gen
git add .
git diff --exit-code HEAD || (
echo "please run bazel run //go:gen"
exit 1
)

- name: Build
shell: bash
run: |
declare -px
where bazel
bazel run go:go-installer
- name: Check that all Go code is autoformatted
if: inputs.run-code-checks == 'true' && !cancelled()
shell: bash
run: |
cd go
make check-formatting
- name: Compile qhelp files to markdown
if: inputs.run-code-checks == 'true' && !cancelled()
id: markdown
shell: bash
run: |
cd go
env QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
- name: Upload qhelp markdown
if: inputs.run-code-checks == 'true' && !cancelled()
uses: actions/upload-artifact@v3
with:
name: qhelp-markdown
path: go/qhelp-out/**/*.md

- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: go-qltest
bazel version
- name: Test
shell: bash
Expand Down

0 comments on commit 5ddccd0

Please sign in to comment.