From a1f054ef74df9706776408c6d1bd76266d790628 Mon Sep 17 00:00:00 2001 From: Asaf Mahlev Date: Sat, 6 Jun 2026 12:44:25 +0300 Subject: [PATCH 1/2] ci: run unit tests (runTests variant) on PRs to dev/main, not just compile Closes the #12 gap (CI only compiled). Runs :app:testOfflineRunTestsUnitTest, which uses the runTests build type whose tests self-skip the network/data tests known to fail on CI. Triggers on PRs to dev+main and pushes to dev. --- .github/workflows/build-test-auto.yml | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-test-auto.yml b/.github/workflows/build-test-auto.yml index e38a803b0..6300efab0 100644 --- a/.github/workflows/build-test-auto.yml +++ b/.github/workflows/build-test-auto.yml @@ -1,21 +1,28 @@ -name: Test build -# builds only for a single abi and does not produce an APK +name: Unit tests +# Compiles main + runs the JVM unit-test suite for the offline flavor using the `runTests` +# build type, which self-skips the network/data-dependent tests known to fail on CI +# (see `if (BuildConfig.BUILD_TYPE == "runTests") return` in XLinkTest/StringUtilsTest/InputLogicTest). +# No APK is produced; single-ABI, JVM tests only. on: -# disabled on push: when I push to non-main, I do a PR anyway -# push: - # don't run on main. I noticed I often don't push commits to avoid unnecessary workflow runs -# branches-ignore: [ main ] -# paths: -# - 'app/**' pull_request: + branches: [ dev, main ] paths: - - 'app/src/main/java**' + - 'app/**' + - 'gradle/**' + - '*.gradle*' + - 'gradle.properties' + - '.github/workflows/build-test-auto.yml' + push: + branches: [ dev ] + paths: + - 'app/**' + - 'gradle/**' + - '*.gradle*' workflow_dispatch: jobs: - build: - + test: runs-on: ubuntu-latest steps: @@ -32,8 +39,8 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew compileOfflineRunTestsKotlin + - name: Run unit tests + run: ./gradlew :app:testOfflineRunTestsUnitTest - name: Archive reports for failed job uses: actions/upload-artifact@v4 From 9f721a4ac07d9397fc566503d3aa7ba3381325f6 Mon Sep 17 00:00:00 2001 From: Asaf Mahlev Date: Sat, 6 Jun 2026 12:51:48 +0300 Subject: [PATCH 2/2] ci: run the test suite non-blocking + always upload reports (until #12 triaged) --- .github/workflows/build-test-auto.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-auto.yml b/.github/workflows/build-test-auto.yml index 6300efab0..f69b8b071 100644 --- a/.github/workflows/build-test-auto.yml +++ b/.github/workflows/build-test-auto.yml @@ -38,13 +38,18 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Run unit tests + # Non-blocking for now: the suite still has ~9 failures on CI (network link tests + + # the #12 known-failing set + 3 new MiscTest.isWideScreen from the v3.8.5 merge). + # This RUNS the full suite and uploads the report on every PR (closing the "CI only + # compiles" gap); flip continue-on-error off once those are triaged (#12) to make it a + # hard gate. + continue-on-error: true run: ./gradlew :app:testOfflineRunTestsUnitTest - - name: Archive reports for failed job + - name: Archive test reports uses: actions/upload-artifact@v4 with: - name: reports + name: test-reports path: '*/build/reports' - if: ${{ failure() }} + if: ${{ always() }}