[pre-commit.ci] pre-commit autoupdate #321
This file contains hidden or 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
| name: lint_test_coverage | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| tests: | |
| name: "Lint + Tests + Coverage" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.21'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: latest | |
| - name: Run unit tests | |
| run: | | |
| make test-container KEEP_TEST_CONTAINER=1 GO_VERSION=${{ matrix.go-version }} | |
| podman cp go-test-container:/app/coverage.out . | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| files: ./coverage.out | |
| flags: go-${{ matrix.go-version }} | |
| name: coverage-go-${{ matrix.go-version }} | |
| fail_ci_if_error: true | |
| verbose: true |