Skip to content

Add golangci-lint and configure GitHub actions #3

Add golangci-lint and configure GitHub actions

Add golangci-lint and configure GitHub actions #3

Workflow file for this run

name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Latest minor versions of Go 1.21 and 1.22
go-version: ["1.21.x", "1.22.x"]
include:
# only update test coverage stats with Go 1.22
- go-version: "1.22.x"
update-coverage: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run Go tests with coverage
run: make test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
if: ${{ matrix.update-coverage }}