From a6ec2cedeb9434ee1fa4cb445eb6e7b3e12154c2 Mon Sep 17 00:00:00 2001 From: Leonhard Breuer Date: Mon, 9 Nov 2026 19:01:44 +0100 Subject: [PATCH] ci: cache Gradle and run tests and lint in parallel Add gradle/actions/setup-gradle so dependencies and build outputs carry over between runs, split ./gradlew test and lintDebug into separate jobs, and stop linting test sources. --- .github/workflows/ci.yml | 19 ++++++++++++++++++- CHANGELOG.md | 1 + app/build.gradle.kts | 6 ++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7872d8..67bccd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,23 @@ jobs: - uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4.0.4 with: packages: 'platform-tools platforms;android-36 build-tools;36.0.0' + - uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1 - run: python3 -m unittest discover -s scripts -p 'test_*.py' - run: python3 scripts/contract.py check - - run: ./gradlew test lintDebug + - run: ./gradlew test + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0 + with: + distribution: temurin + java-version: '17' + - uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4.0.4 + with: + packages: 'platform-tools platforms;android-36 build-tools;36.0.0' + - uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1 + - run: ./gradlew lintDebug diff --git a/CHANGELOG.md b/CHANGELOG.md index da77f2f..11e4fef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- CI caches Gradle and runs tests and lint as parallel jobs. Lint skips test sources. - Publish signed release APKs: a `vX.Y.Z` tag builds one with FCM and attaches it to a GitHub release. Release builds are signed when `CRUMBLE_KEYSTORE_PATH` and `CRUMBLE_KEYSTORE_PASSWORD` are set, and take their version from `crumble.versionName` and `crumble.versionCode`. - The bot form shows the portrait with a pencil, and the avatar editor opens in a dialog instead of filling the form, as on the web. - Pin the bot's `6.0.0` contract as a local export and bump the generator to `1.1.0`, adding closed objects with declared properties, nullable named schemas and `allOf` parts, and `*/*` binary responses. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 25c2323..1dea5dd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -61,6 +61,12 @@ android { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } + + // Lint only shipped app code: test sources and the avatar library roughly doubled CI lint time. + lint { + ignoreTestSources = true + checkDependencies = false + } } kotlin {