--- 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.24" - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: version: latest env: VERBOSE: "true" tidy: name: Tidy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.24" cache: true - 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.24" cache: true - name: Publish coverage uses: paambaati/codeclimate-action@v6 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: # Only test versions where testing.T interface changed: - "1.15" # Base version - "1.16" # Added Setenv() - "1.17" # Representative of 1.17-1.23 (no changes) - "1.24" # Added Context() and Chdir() runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go_version }} cache: true - name: Run tests run: go test -v -count=1 -race ./...