on: push: branches: - "main" tags: - "v*.*.*" pull_request: jobs: test: name: Test runs-on: ubuntu-latest strategy: fail-fast: false matrix: go: - '^1.18' - '^1.19' - '^1.20' - '^1.21' - '^1.22' steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} cache: true - name: Test Coverage (pkg) run: go test ./... -race -coverprofile="coverage.txt" - name: Upload coverage if: ${{ matrix.go == '^1.22' }} uses: codecov/codecov-action@v4 with: file: "coverage.txt" token: ${{ secrets.CODECOV_TOKEN }}