chore(CI): Debug artifact download #441
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: Test | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| - name: Download dependencies | |
| run: find . -name go.mod -execdir go mod download \; | |
| - name: Verify go.mod and go.sum are up to date | |
| run: | | |
| find . -name go.mod -execdir go mod tidy \; | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "Error: go.mod or go.sum files are not up to date" | |
| echo "Modified files:" | |
| git diff | |
| echo "" | |
| echo "Please run 'go mod tidy' in all directories containing go.mod and commit the changes" | |
| exit 1 | |
| fi | |
| - name: Run tests with coverage | |
| run: make test-coverage-and-junit | |
| - name: Run E2E smoke test | |
| run: make e2e-smoke-test | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - name: Setup proto files | |
| run: ./scripts/setup-proto-files.sh | |
| - name: Generate proto descriptors | |
| run: make proto-generate | |
| - name: Download WireMock | |
| run: make mock-download | |
| - name: Start WireMock | |
| run: make mock-start | |
| - name: Run integration tests | |
| run: make test-integration-coverage | |
| - name: Stop WireMock | |
| if: always() | |
| run: make mock-stop | |
| - name: Upload WireMock logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wiremock-logs | |
| path: wiremock/wiremock.log | |
| if-no-files-found: ignore | |
| - name: Upload test results to Codecov | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.out | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| flags: unit | |
| name: unit-tests | |
| - name: Upload integration test coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage-integration.out | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| flags: integration | |
| name: integration-tests |