Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to show PR coverage report #1812

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
timeout-minutes: 55
strategy:
matrix:
api-level: [26, 34]
api-level: [ 26, 34 ]

steps:
- name: Delete unnecessary tools 🔧
Expand Down Expand Up @@ -199,27 +199,30 @@ jobs:
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: ./gradlew connectedDemoDebugAndroidTest --daemon
# && killall -INT crashpad_handler || true
# came from https://github.com/ReactiveCircus/android-emulator-runner/issues/385#issuecomment-2492035091
script: |
./gradlew connectedDemoDebugAndroidTest --daemon && killall -INT crashpad_handler || true

- name: Run local tests (including Roborazzi) for the combined coverage report (only API 30)
if: matrix.api-level == 30
- name: Run local tests (including Roborazzi) for the combined coverage report (only API 34)
if: matrix.api-level == 34
# There is no need to verify Roborazzi tests to generate coverage.
run: ./gradlew testDemoDebugUnitTest -Proborazzi.test.verify=false # Add Prod if we ever add JVM tests for prod

# Add `createProdDebugUnitTestCoverageReport` if we ever add JVM tests for prod
- name: Generate coverage reports for Debug variants (only API 30)
if: matrix.api-level == 30
- name: Generate coverage reports for Debug variants (only API 34)
if: matrix.api-level == 34
run: ./gradlew createDemoDebugCombinedCoverageReport

- name: Upload test reports
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.api-level }}
path: '**/build/reports/androidTests'

- name: Display local test coverage (only API 30)
if: matrix.api-level == 30
- name: Display local test coverage (only API 34)
if: matrix.api-level == 34
id: jacoco
uses: madrapps/[email protected]
with:
Expand All @@ -229,9 +232,9 @@ jobs:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload local coverage reports (XML + HTML) (only API 30)
if: matrix.api-level == 30

- name: Upload local coverage reports (XML + HTML) (only API 34)
if: matrix.api-level == 34
uses: actions/upload-artifact@v4
with:
name: coverage-reports
Expand Down
Loading