mirror of
https://github.com/ivuorinen/go-test-sarif.git
synced 2026-02-05 19:45:58 +00:00
feat: the app (#2)
This commit is contained in:
14
.github/workflows/release-drafter.yml
vendored
14
.github/workflows/release-drafter.yml
vendored
@@ -1,14 +0,0 @@
|
||||
---
|
||||
name: Release Drafter
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
Draft:
|
||||
uses: ivuorinen/.github/.github/workflows/sync-labels.yml@main
|
||||
32
.github/workflows/test.yml
vendored
Normal file
32
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
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@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@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@v2
|
||||
with:
|
||||
sarif_file: go-test-results.sarif
|
||||
Reference in New Issue
Block a user