ci: update golangci-lint, remove deprecated linters (#46) #115
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
on: [ push, pull_request ] | |
jobs: | |
unit: | |
strategy: | |
matrix: | |
go: [ "1.21.x", "1.22.x" ] | |
runs-on: ubuntu-latest | |
name: Unit tests (Go ${{ matrix.go }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- run: go version | |
- name: Install dependencies | |
run: go build | |
- name: Run tests | |
run: go run github.com/onsi/ginkgo/v2/ginkgo -r -v -cover -randomize-all -randomize-suites -trace -skip-package integrationtests | |
- name: Run tests (32 bit) | |
env: | |
GOARCH: 386 | |
run: go run github.com/onsi/ginkgo/v2/ginkgo -r -v -cover -coverprofile coverage.txt -output-dir . -randomize-all -randomize-suites -trace -skip-package integrationtests | |
- name: Run tests with race detector | |
run: go run github.com/onsi/ginkgo/v2/ginkgo -r -v -race -randomize-all -randomize-suites -trace -skip-package integrationtests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: coverage.txt | |
env_vars: GO=${{ matrix.go }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
integration: | |
strategy: | |
matrix: | |
go: [ "1.21.x", "1.22.x" ] | |
runs-on: ubuntu-latest | |
name: Integration tests (Go ${{ matrix.go }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- run: go version | |
- name: Install dependencies | |
run: go build | |
- name: Run tests | |
run: | | |
for i in {1..25}; do | |
go run github.com/onsi/ginkgo/v2/ginkgo -race -v -randomize-all -trace integrationtests/self; | |
done | |