Codecov Code Coverage #25
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: Codecov Code Coverage | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| codecov_test: | |
| name: Run Unit and Integration Tests with Coverage | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Gateway Unit Tests | |
| continue-on-error: true | |
| run: | | |
| cd gateway | |
| make test | |
| - name: CLI Unit Tests | |
| continue-on-error: true | |
| run: | | |
| cd cli/src | |
| make test | |
| - name: Build coverage-instrumented images | |
| run: | | |
| cd gateway | |
| make build-coverage | |
| - name: Build sample-service | |
| run: | | |
| cd samples/sample-service | |
| make build | |
| - name: Run Gateway integration tests | |
| continue-on-error: true | |
| run: | | |
| cd gateway | |
| make test-integration | |
| - name: Build CLI binary | |
| run: | | |
| cd cli/it | |
| make build-cli-coverage | |
| - name: Run CLI integration tests | |
| continue-on-error: true | |
| run: | | |
| cd cli/it | |
| make test | |
| - name: List generated coverage files | |
| run: | | |
| echo "=== Finding all coverage.txt files ===" | |
| find . -name "*coverage.txt" -type f | |
| - name: Upload unit test coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/unit-test-coverage.txt' | |
| flags: unit | |
| - name: Upload Gateway integration test coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: gateway/it/coverage/output/txt | |
| flags: integration | |
| - name: Upload CLI integration test coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: cli/it/coverage/output/txt | |
| flags: cli-integration |