From c9ed908424fb6070f6bbc5414c153c7e84e69290 Mon Sep 17 00:00:00 2001 From: blue928sky Date: Sat, 18 Jan 2025 14:46:43 +0900 Subject: [PATCH 01/10] fix: Coverage report is not displayed Change-Id: I0fcb548c30c0cd8fce47fe70e086d43e90813e8d --- .github/workflows/Build.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 5a212bffb..f7a103249 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -201,14 +201,14 @@ jobs: heap-size: 600M script: ./gradlew connectedDemoDebugAndroidTest --daemon - - 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 @@ -218,8 +218,8 @@ jobs: 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/jacoco-report@v1.7.1 with: @@ -230,8 +230,8 @@ jobs: ${{ 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 From 95e8b1a174251208ffe274886b22167dac47d596 Mon Sep 17 00:00:00 2001 From: blue928sky Date: Tue, 21 Jan 2025 20:09:02 +0900 Subject: [PATCH 03/10] Change ubuntu version, because androidTest(34) workflow fails Change-Id: I09ed78d4aee0492497a71bd697a23843537a7ca7 --- .github/workflows/Build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index f7a103249..39e44154f 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -13,7 +13,7 @@ concurrency: jobs: test_and_apk: name: "Local tests and APKs" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: write From e653f7501efe31250b2878e4e3b6e92c98217451 Mon Sep 17 00:00:00 2001 From: blue928sky Date: Sun, 2 Feb 2025 15:37:10 +0900 Subject: [PATCH 05/10] Revert "Change ubuntu version, because androidTest(34) workflow fails" This reverts commit 95e8b1a174251208ffe274886b22167dac47d596. --- .github/workflows/Build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 39e44154f..f7a103249 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -13,7 +13,7 @@ concurrency: jobs: test_and_apk: name: "Local tests and APKs" - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: contents: write From 46553e1302492508a66f595cfb1a23fcfca7baed Mon Sep 17 00:00:00 2001 From: blue928sky Date: Sun, 2 Feb 2025 15:31:43 +0900 Subject: [PATCH 06/10] Fix an hang on problem. https://github.com/ReactiveCircus/android-emulator-runner/issues/385#issuecomment-2492035091 Change-Id: Id0dc3b07e9836cb4f3704450e2eb520412ba73b9 --- .github/workflows/Build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index f7a103249..3944aae17 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -199,7 +199,10 @@ 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 34) if: matrix.api-level == 34 From 704e79ba7b6ca1d2169f0b294dcdd9c171cc92e4 Mon Sep 17 00:00:00 2001 From: blue928sky Date: Sun, 2 Feb 2025 15:32:26 +0900 Subject: [PATCH 07/10] Fix format Change-Id: Id326aae86bfe9345b1207110bf4e648983c0dd91 --- .github/workflows/Build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 3944aae17..c243e1138 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -153,7 +153,7 @@ jobs: timeout-minutes: 55 strategy: matrix: - api-level: [26, 34] + api-level: [ 26, 34 ] steps: - name: Delete unnecessary tools 🔧 @@ -213,7 +213,7 @@ jobs: - 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 @@ -232,7 +232,7 @@ jobs: paths: | ${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml token: ${{ secrets.GITHUB_TOKEN }} - + - name: Upload local coverage reports (XML + HTML) (only API 34) if: matrix.api-level == 34 uses: actions/upload-artifact@v4 From ac51640e0b339befb7c9eceb2fdacc1ce0363f7b Mon Sep 17 00:00:00 2001 From: blue928sky Date: Thu, 31 Jul 2025 09:17:59 +0900 Subject: [PATCH 09/10] Delete commands that are probably no longer needed Change-Id: Ib0a91c8ce4c032e149b806b14d93ce9a4102987e --- .github/workflows/Build.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 716449e43..3dcd95840 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -221,10 +221,7 @@ jobs: disable-animations: true disk-size: 6000M heap-size: 600M - # && 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 + script: ./gradlew connectedDemoDebugAndroidTest --daemon - name: Run local tests (including Roborazzi) for the combined coverage report (only API 34) if: matrix.api-level == 34 From fe0321992e4fd1b46986b4e5d27fc2518fb57f71 Mon Sep 17 00:00:00 2001 From: blue928sky Date: Thu, 31 Jul 2025 09:39:38 +0900 Subject: [PATCH 10/10] fix: permissions Change-Id: Ie6e4712241069da331247c97728bfa8ff72a1dfc --- .github/workflows/Build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 3dcd95840..3563c37a8 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -18,7 +18,6 @@ jobs: permissions: contents: write - pull-requests: write security-events: write timeout-minutes: 60 @@ -170,6 +169,10 @@ jobs: androidTest: runs-on: ubuntu-latest timeout-minutes: 55 + + permissions: + pull-requests: write + strategy: matrix: api-level: [ 26, 34 ]