-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into kotlin-2.0.0
- Loading branch information
Showing
14 changed files
with
151 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ jobs: | |
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
timeout-minutes: 60 | ||
|
||
|
@@ -105,12 +106,13 @@ jobs: | |
commit_message: "🤖 Updates screenshots" | ||
|
||
# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots. | ||
- name: Run local tests | ||
- name: Run local tests and create report | ||
if: always() | ||
run: ./gradlew testDemoDebug :lint:test -Pksp.useKSP2=${{ matrix.useKSP2 }} -Pandroid.lint.useK2Uast=${{ matrix.useK2Uast }} -Pandroid.experimental.lint.version=8.5.0-alpha02 | ||
# Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when | ||
# https://android-review.googlesource.com/c/platform/frameworks/support/+/2602790 landed in a | ||
# release build | ||
|
||
- name: Build all build type and flavor permutations | ||
run: ./gradlew :app:assemble :benchmarks:assemble | ||
-x pixel6Api33ProdNonMinifiedReleaseAndroidTest | ||
|
@@ -125,11 +127,11 @@ jobs: | |
name: APKs-${{ matrix.useKSP2 }}-${{ matrix.useK2Uast }} | ||
path: '**/build/outputs/apk/**/*.apk' | ||
|
||
- name: Upload test results (XML) | ||
- name: Upload JVM local results (XML) | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-results-${{ matrix.useKSP2 }}-${{ matrix.useK2Uast }} | ||
name: local-test-results-${{ matrix.useKSP2 }}-${{ matrix.useK2Uast }} | ||
path: '**/build/test-results/test*UnitTest/**.xml' | ||
|
||
- name: Check lint | ||
|
@@ -186,10 +188,7 @@ jobs: | |
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
|
||
- name: Build projects before running emulator | ||
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest | ||
|
||
- name: Run instrumentation tests | ||
- name: Build projects and run instrumentation tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
|
@@ -199,9 +198,41 @@ 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 | ||
# 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 | ||
run: ./gradlew createDemoDebugCombinedCoverageReport | ||
|
||
- name: Upload test reports | ||
if: always() | ||
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 | ||
id: jacoco | ||
uses: madrapps/[email protected] | ||
with: | ||
title: Combined test coverage report | ||
min-coverage-overall: 40 | ||
min-coverage-changed-files: 60 | ||
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 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-reports | ||
if-no-files-found: error | ||
compression-level: 1 | ||
overwrite: false | ||
path: '**/build/reports/jacoco/' |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.