Merge pull request #36 from gogrlx/cd/ci-improvements

ci: add staticcheck lint job and Go version matrix
This commit is contained in:
2026-03-05 17:39:20 -05:00
committed by GitHub

View File

@@ -6,18 +6,34 @@ on:
branches: [master]
jobs:
unit-tests:
name: Unit Tests
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go build ./...
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- run: go vet ./...
- run: staticcheck ./...
unit-tests:
name: Unit Tests (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.26']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: go build ./...
- run: go test -race -coverprofile=coverage-unit.out ./...
- uses: actions/upload-artifact@v4
if: matrix.go-version == '1.26'
with:
name: coverage-unit
path: coverage-unit.out
@@ -174,7 +190,7 @@ jobs:
codecov:
name: Upload Coverage
runs-on: ubuntu-latest
needs: [unit-tests, debian, ubuntu, fedora-dnf4, fedora-dnf5, alpine, arch, flatpak]
needs: [lint, unit-tests, debian, ubuntu, fedora-dnf4, fedora-dnf5, alpine, arch, flatpak]
if: always()
steps:
- uses: actions/checkout@v4