split actions and go22 #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: push | |
jobs: | |
build: | |
name: humannumbers build | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
check-latest: true | |
cache: true | |
go-version: "1.22" | |
- name: Build & Test | |
run: | | |
go clean -r ./... | |
go mod tidy | |
go build -v -ldflags="-s -w" ./... | |
go test -v -race -count 1 -parallel 5 -covermode=atomic -coverprofile="coverage.out" ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true # optional (default = false) | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: latest | |
args: --timeout=5m | |
- name: Govulncheck | |
uses: kmulvey/govulncheck-action@v1.2.0 |