Skip to content

ci: update CI workflow #22

ci: update CI workflow

ci: update CI workflow #22

Workflow file for this run

---
name: CI
on: [push]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.18"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56
env:
VERBOSE: "true"
tidy:
name: Tidy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.18"
- name: Check if mods are tidy
run: make check-tidy
cov:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.18"
- name: Publish coverage
uses: paambaati/[email protected]
env:
VERBOSE: "true"
GOMAXPROCS: 4
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: make cov
prefix: github.com/${{ github.repository }}
coverageLocations: |
${{ github.workspace }}/coverage.out:gocov
test:
name: Test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
go_version:
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Run tests
run: go test -v -count=1 -race ./...