diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14c65837..2b61be3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: run: swift build --build-tests -Xswiftc -warnings-as-errors - name: Test - run: swift test --filter TMDbTests --enable-code-coverage + run: swift test --filter TMDbTests --enable-code-coverage --xunit-output junit.xml - name: Prepare Code Coverage run: | @@ -40,6 +40,16 @@ jobs: .build/debug/TMDbPackageTests.xctest/Contents/MacOS/TMDbPackageTests \ -instr-profile .build/debug/codecov/default.profdata > info.lcov + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + file: ./junit-swift-testing.xml + flags: unit-tests + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index be5e453c..7020405a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -34,8 +34,18 @@ jobs: run: swift build --build-tests - name: Test - run: swift test --skip-build --filter TMDbIntegrationTests + run: swift test --skip-build --filter TMDbIntegrationTests --xunit-output junit.xml env: TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }} TMDB_USERNAME: ${{ secrets.TMDB_USERNAME }} TMDB_PASSWORD: ${{ secrets.TMDB_PASSWORD }} + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + file: ./junit-swift-testing.xml + flags: integration-tests + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 057193ff..f4b9ea95 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ xcuserdata/ *.xctestplan docs/ info.lcov -default.profraw \ No newline at end of file +default.profraw +junit-swift-testing.xml