mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-21 15:52:54 +00:00
ci: add sandboxed daily checks for staticcheck, govulncheck, and tests
This commit is contained in:
58
.github/workflows/checks.yaml
vendored
Normal file
58
.github/workflows/checks.yaml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Sandboxed daily checks
|
||||
on:
|
||||
schedule: # Every day at 9:42 UTC
|
||||
- cron: '42 9 * * *'
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go:
|
||||
- { go-version: stable }
|
||||
- { go-version-file: go.mod }
|
||||
deps:
|
||||
- locked
|
||||
- latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # ratchet:actions/setup-go@v6
|
||||
with:
|
||||
go-version: ${{ matrix.go.go-version }}
|
||||
go-version-file: ${{ matrix.go.go-version-file }}
|
||||
- uses: geomys/sandboxed-step@7d75eb49d17fdeeb3656b3a57d35932d205bcfb9 # ratchet:geomys/sandboxed-step@v1.2.1
|
||||
with:
|
||||
run: |
|
||||
if [ "${{ matrix.deps }}" = "latest" ]; then
|
||||
go get -u -t ./...
|
||||
fi
|
||||
go test ./...
|
||||
staticcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # ratchet:actions/setup-go@v6
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
- uses: geomys/sandboxed-step@7d75eb49d17fdeeb3656b3a57d35932d205bcfb9 # ratchet:geomys/sandboxed-step@v1.2.1
|
||||
with:
|
||||
run: go run honnef.co/go/tools/cmd/staticcheck@latest ./...
|
||||
govulncheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # ratchet:actions/setup-go@v6
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
- uses: geomys/sandboxed-step@7d75eb49d17fdeeb3656b3a57d35932d205bcfb9 # ratchet:geomys/sandboxed-step@v1.2.1
|
||||
with:
|
||||
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|
||||
Reference in New Issue
Block a user