Update anvil-codegen #435
Workflow file for this run
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
name: Instrumented tests on self-hosted runner | |
on: | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
branches: | |
- main | |
push: | |
paths-ignore: | |
- '**/*.md' | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
env: | |
CI: true | |
TERM: dumb | |
GRADLE_OPTS: >- | |
-Dorg.gradle.jvmargs="-Xmx1536M -XX:MaxMetaspaceSize=1g -XX:SoftRefLRUPolicyMSPerMB=10 -XX:+UseParallelGC" | |
-Dorg.gradle.parallel=true | |
-Dorg.gradle.workers.max=2 | |
-Dorg.gradle.vfs.watch=false | |
-Dorg.gradle.dependency.verification.console=verbose | |
-DwarningsAsErrors=false | |
KOTLIN_DAEMON_JVMARGS: >- | |
-Xmx1536M -XX:MaxMetaspaceSize=320M -XX:SoftRefLRUPolicyMSPerMB=10 -XX:+UseParallelGC -XX:NewRatio=1 | |
jobs: | |
instrumented-tests: | |
name: Instrumented tests | |
runs-on: self-hosted | |
timeout-minutes: 60 | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} | |
steps: | |
- name: Clean the repository | |
run: | | |
/usr/bin/git clean -ffd || true | |
/usr/bin/git reset --hard HEAD || true | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
clean: false | |
fetch-depth: 0 | |
lfs: true | |
submodules: true | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '20' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Unpack pixnews.properties | |
env: | |
PIXNEWS_CONFIG: ${{ secrets.PIXNEWS_CONFIG }} | |
run: echo "$PIXNEWS_CONFIG" | base64 -d | zstd -d -o config/pixnews.properties | |
- name: Clean unused managed devices | |
run: > | |
./gradlew | |
-Pkotlin.daemon.jvmargs="${{ env.KOTLIN_DAEMON_JVMARGS }}" | |
-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect | |
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true | |
cleanManagedDevices --unused-only | |
--scan --continue | |
- name: Run instrumented tests | |
run: > | |
./gradlew | |
-Pkotlin.daemon.jvmargs="${{ env.KOTLIN_DAEMON_JVMARGS }}" | |
-Dorg.gradle.workers.max=1 | |
-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect | |
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true | |
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules="" | |
pixel2api30DebugAndroidTest | |
--scan --continue | |
- name: Cleanup secrets | |
if: ${{ always() }} | |
run: rm -f config/pixnews.properties | |
- name: Publish instrumented test results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: ${{ !cancelled() }} | |
with: | |
comment_mode: off | |
junit_files: '**/build/outputs/androidTest-results/**/*.xml' | |
check_name: "Instrumented test results" | |
- name: Bundle the instrumented tests report | |
if: ${{ failure() }} | |
run: >- | |
find . -type d \( -path '*/build/compose-*' | |
-o -path '*/build/outputs/androidTest-results' | |
-o -path '*/build/outputs/managed_*' | |
-o -path '*/build/reports/androidTests' \) -print0 | |
| xargs -0 tar -c -I 'zstd -19 -T0' -f instrumented-tests.tar.zst | |
- name: Upload test reports | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: instrumented-test-reports | |
path: instrumented-tests.tar.zst |