Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ on:
workflow_call:

jobs:
tests:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ['1.24', 'stable']
steps:
-
name: Checkout
Expand All @@ -22,7 +26,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
go-version: ${{ matrix.go-version }}
-
name: Cache Go modules
uses: actions/cache@v5
Expand All @@ -37,12 +41,32 @@ jobs:
go mod tidy
go test -v ./...
-
# staticcheck v0.7.0 requires Go >= 1.25, so only run linters on
# the latest toolchain in the matrix. Tests still cover all
# supported Go versions.
name: Run staticcheck
if: matrix.go-version == 'stable'
run: |
go install honnef.co/go/tools/cmd/staticcheck@v0.7.0
staticcheck ./...
-
name: Run gosec
if: matrix.go-version == 'stable'
run: |
go install github.com/securego/gosec/v2/cmd/gosec@v2.24.7
gosec ./...

# Aggregator job kept under the stable name "tests" so the branch
# protection required check does not need to be reconfigured every
# time the matrix changes.
tests:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Check matrix results
run: |
if [ "${{ needs.test.result }}" != "success" ]; then
echo "matrix job failed: ${{ needs.test.result }}"
exit 1
fi
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/mojatter/wfs

go 1.26
go 1.24
Loading