cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
.github/workflows/test.yml
61lines · modecode
| 1 | name: Test Go code |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | pull_request: |
| 8 | branches: |
| 9 | - main |
| 10 | |
| 11 | permissions: read-all |
| 12 | |
| 13 | jobs: |
| 14 | test-go: |
| 15 | runs-on: ubuntu-latest |
| 16 | steps: |
| 17 | - name: Check out code |
| 18 | uses: actions/checkout@v4 |
| 19 | with: |
| 20 | show-progress: false |
| 21 | |
| 22 | - name: Set up Go |
| 23 | uses: actions/setup-go@v5 |
| 24 | with: |
| 25 | go-version-file: go.ver |
| 26 | cache: false |
| 27 | |
| 28 | - name: Test |
| 29 | run: make test |
| 30 | |
| 31 | - name: Check for local changes |
| 32 | run: git diff --exit-code |
| 33 | |
| 34 | # Codecov reporting is unreliable. |
| 35 | # Re-run report 3 times to have a better |
| 36 | # chance of success. |
| 37 | - name: Report code coverage (1) |
| 38 | uses: codecov/codecov-action@v4 |
| 39 | with: |
| 40 | token: ${{ secrets.CODECOV_TOKEN }} |
| 41 | files: ./.cover/coverage.out |
| 42 | fail_ci_if_error: true |
| 43 | handle_no_reports_found: true |
| 44 | continue-on-error: true |
| 45 | |
| 46 | - name: Report code coverage (2) |
| 47 | uses: codecov/codecov-action@v4 |
| 48 | with: |
| 49 | token: ${{ secrets.CODECOV_TOKEN }} |
| 50 | files: ./.cover/coverage.out |
| 51 | fail_ci_if_error: true |
| 52 | handle_no_reports_found: true |
| 53 | continue-on-error: true |
| 54 | |
| 55 | - name: Report code coverage (3) |
| 56 | uses: codecov/codecov-action@v4 |
| 57 | with: |
| 58 | token: ${{ secrets.CODECOV_TOKEN }} |
| 59 | files: ./.cover/coverage.out |
| 60 | fail_ci_if_error: true |
| 61 | handle_no_reports_found: true |
| 62 | |