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 2d50476..f1c2da2 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. - `scripts/contract.py update --from DIRECTORY` copies the contract files from a directory such as `bot/openapi/`, replacing `--local` and `--release`. `contract/` no longer carries `pin.json`, `SHA256SUMS`, `CHANGELOG.md`, or `source-commit.txt`; the `verify` and `update-latest` commands and the weekly contract update workflow are gone. - 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. 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 {