ci: run sast+tests
This commit is contained in:
parent
fba9720db0
commit
40e9ccc61c
1 changed files with 24 additions and 0 deletions
24
.forgejo/workflows/push.yml
Normal file
24
.forgejo/workflows/push.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: './go.mod'
|
||||
- name: Install dependencies
|
||||
run: go mod tidy
|
||||
- name: Run tests
|
||||
run: go test -v
|
||||
sast:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: './go.mod'
|
||||
- name: Check formatting
|
||||
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
|
Loading…
Reference in a new issue