Merge remote-tracking branch 'origin/main' into remove_teardown_job_r… #66
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: Unit Tests | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Run on Ubuntu | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Clone the code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Running Tests with Coverage | |
| run: | | |
| go mod tidy | |
| make test | |
| - name: check test coverage | |
| if: github.ref == 'refs/heads/main' | |
| uses: vladopajic/go-test-coverage@v2 | |
| with: | |
| config: ./.github/.testcoverage.yml | |
| git-branch: badges | |
| git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }} | |
| - name: Check test coverage | |
| if: github.ref != 'refs/heads/main' | |
| uses: vladopajic/go-test-coverage@v2 | |
| with: | |
| config: ./.github/.testcoverage.yml |