mirror of
https://github.com/FiloSottile/age.git
synced 2026-02-03 00:32:02 +00:00
Remove the go-version-file test target, because it will just use the toolchain line. It's a bit unfortunate we lose coverage of a go.mod version that's older than oldstable, but that should not happen and it'd not be a supported Go version anyway.
76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
name: Go tests
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule: # daily at 09:42 UTC
|
|
- cron: '42 9 * * *'
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go:
|
|
- { go-version: stable }
|
|
- { go-version: oldstable }
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ${{ matrix.go.go-version }}
|
|
- run: |
|
|
go test -race ./...
|
|
test-latest:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go:
|
|
- { go-version: stable }
|
|
- { go-version: oldstable }
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ${{ matrix.go.go-version }}
|
|
- uses: geomys/sandboxed-step@v1.2.1
|
|
with:
|
|
run: |
|
|
go get -u -t ./...
|
|
go test -race ./...
|
|
staticcheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: stable
|
|
- uses: 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@v5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: stable
|
|
- uses: geomys/sandboxed-step@v1.2.1
|
|
with:
|
|
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|