Update Room to 2.7.0-alpha02 with bundled sqlite driver. Update other… #1284
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: CI | |
on: | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
push: | |
paths-ignore: | |
- '**/*.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
env: | |
CI: true | |
TERM: dumb | |
GRADLE_OPTS: >- | |
-Dorg.gradle.jvmargs="-Xmx4G -XX:MaxMetaspaceSize=1g -XX:SoftRefLRUPolicyMSPerMB=10 -XX:+UseParallelGC -XX:NewRatio=1" | |
-Dorg.gradle.dependency.verification.console=verbose | |
KOTLIN_DAEMON_JVMARGS: >- | |
-Xmx1G -XX:MaxMetaspaceSize=320M -XX:SoftRefLRUPolicyMSPerMB=10 -XX:+UseParallelGC -XX:NewRatio=1 | |
jobs: | |
assemble: | |
name: Assemble debug, run tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
clean: true | |
fetch-depth: 0 | |
lfs: true | |
submodules: true | |
- name: Check LFS files | |
uses: actionsdesk/[email protected] | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Unpack pixnews.properties | |
env: | |
PIXNEWS_CONFIG: ${{ secrets.PIXNEWS_CONFIG }} | |
run: echo "$PIXNEWS_CONFIG" | base64 -d | zstd -d -o config/pixnews.properties | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Assemble debug build, run tests | |
run: > | |
./gradlew -Pkotlin.daemon.jvmargs="${{ env.KOTLIN_DAEMON_JVMARGS }}" | |
assembleDebug test validateScreenshotTest --scan --stacktrace | |
- name: Cleanup secrets | |
if: ${{ always() }} | |
run: rm -f config/pixnews.properties | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: build-outputs | |
path: app/build/outputs | |
- name: Publish test results | |
uses: EnricoMi/publish-unit-test-result-action/linux@v2 | |
if: ${{ !cancelled() }} | |
with: | |
comment_mode: off | |
junit_files: '**/build/test-results/**/*.xml' | |
check_name: "Unit test results" | |
- name: Bundle the build report | |
if: ${{ failure() }} | |
run: > | |
find . \( | |
-name .idea -o -path '*build/intermediates' -o -path '*build/.transforms' -o -path '*build/generated' | |
\) -prune -o | |
-type d \( -name 'reports' -o -name 'compose-metrics' -o -name 'compose-reports' -o -name 'out' \) -print0 | |
| xargs -0 tar -c -I 'zstd -19 -T0' -f test-reports.tar.zst | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: test-reports | |
path: test-reports.tar.zst | |
static-analysis: | |
name: Style check | |
runs-on: ubuntu-latest | |
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 | |
submodules: true | |
- name: Install dprint | |
shell: bash | |
run: | | |
[ ! -e ~/.dprint/bin/dprint ] && curl -fsSL https://dprint.dev/install.sh | sh > /dev/null 2>&1 | |
echo "$HOME/.dprint/bin" >> $GITHUB_PATH | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Run dprint | |
run: dprint check | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Unpack pixnews.properties | |
env: | |
PIXNEWS_CONFIG: ${{ secrets.PIXNEWS_CONFIG }} | |
run: echo "$PIXNEWS_CONFIG" | base64 -d | zstd -d -o config/pixnews.properties | |
- name: Run static code analyzers | |
run: > | |
./gradlew -Pkotlin.daemon.jvmargs="${{ env.KOTLIN_DAEMON_JVMARGS }}" | |
styleCheck --continue | |
- name: Cleanup secrets | |
if: ${{ always() }} | |
run: rm -f config/pixnews.properties | |
- name: Uploads .sarif files to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ./build/reports/detekt/report.sarif | |
category: detekt | |
- name: Bundle the build report | |
if: ${{ !cancelled() }} | |
run: > | |
tar -c -I 'zstd -19 -T0' -f lint-outputs.tar.zst build/reports | |
- name: Upload lint outputs | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lint-outputs | |
path: lint-outputs.tar.zst |