fix(REVERSE_PROXY.md): rendezvous APIs should be authenticated #319
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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| name: Go test coverage | |
| jobs: | |
| coverage: | |
| name: Measure test coverage (unit + integration tests) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install golang | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Run tests with coverage | |
| run: make test-coverage | |
| - name: Download base coverage breakdown | |
| id: download-main-breakdown | |
| uses: dawidd6/action-download-artifact@v17 | |
| with: | |
| branch: main | |
| workflow_conclusion: success | |
| name: main.breakdown | |
| if_no_artifact_found: warn | |
| # continue-on-error: allow workflow to proceed to post PR comment and upload artifacts | |
| - name: Check coverage thresholds | |
| id: coverage | |
| uses: vladopajic/go-test-coverage@v2 | |
| continue-on-error: true | |
| with: | |
| config: .testcoverage.yml | |
| breakdown-file-name: ${{ github.ref_name == 'main' && 'main.breakdown' || '' }} | |
| diff-base-breakdown-file-name: ${{ steps.download-main-breakdown.outputs.found_artifact == 'true' && 'main.breakdown' || '' }} | |
| - name: Save PR metadata | |
| if: github.event_name == 'pull_request' | |
| env: | |
| COVERAGE_REPORT: ${{ steps.coverage.outputs.report }} | |
| run: | | |
| mkdir -p pr-metadata | |
| echo "${{ github.event.pull_request.number }}" > pr-metadata/pr-number | |
| printf '%s\n' "$COVERAGE_REPORT" > pr-metadata/coverage-report.json | |
| - name: Upload PR metadata | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pr-metadata | |
| path: pr-metadata/ | |
| - name: Upload coverage breakdown | |
| uses: actions/upload-artifact@v7 | |
| if: github.ref_name == 'main' | |
| with: | |
| name: main.breakdown | |
| path: main.breakdown | |
| if-no-files-found: error | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: test/coverage/coverage.html | |
| # fail the workflow if coverage thresholds are not met, after PR comment and artifacts are posted | |
| - name: Fail if coverage thresholds not met | |
| if: steps.coverage.outcome == 'failure' | |
| shell: bash | |
| run: echo "Coverage thresholds are not met." && exit 1 |