mirror of
https://github.com/ivuorinen/go-test-sarif.git
synced 2026-01-26 11:14:00 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
33 lines
827 B
YAML
33 lines
827 B
YAML
name: Run Go Tests and Generate SARIF
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Run Go Tests
|
|
run: go test -json ./... > go-test-results.json
|
|
|
|
- name: Convert JSON to SARIF
|
|
uses: ivuorinen/go-test-sarif@v1
|
|
with:
|
|
test_results: go-test-results.json
|
|
|
|
- name: Upload SARIF to GitHub Security Tab
|
|
uses: github/codeql-action/upload-sarif@5f8171a638ada777af81d42b55959a643bb29017 # v3
|
|
with:
|
|
sarif_file: go-test-results.sarif
|