From b878ed4df3e66b48b4607862073c0f77a313367b Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 11 Mar 2026 16:06:15 +0100 Subject: [PATCH] simplify workflows --- .github/workflows/code-format.yml | 35 ------------------------------- .github/workflows/preview-apk.yml | 19 +++++++++++------ 2 files changed, 13 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/code-format.yml diff --git a/.github/workflows/code-format.yml b/.github/workflows/code-format.yml deleted file mode 100644 index 60980bae1..000000000 --- a/.github/workflows/code-format.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Check code formatting - -on: - push: - branches: [main] - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -jobs: - spotless: - name: Check Java formatting (Spotless) - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-java@v5 - with: - java-version: 17 - distribution: temurin - - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v4 - - name: Check formatting - run: ./gradlew spotlessCheck diff --git a/.github/workflows/preview-apk.yml b/.github/workflows/preview-apk.yml index a5572ed81..d921eea0f 100644 --- a/.github/workflows/preview-apk.yml +++ b/.github/workflows/preview-apk.yml @@ -14,14 +14,12 @@ jobs: - uses: actions/checkout@v5 with: submodules: recursive - - uses: Swatinem/rust-cache@v2 - with: - working-directory: jni/deltachat-core-rust + - uses: actions/setup-java@v5 with: java-version: 17 distribution: 'temurin' - - uses: android-actions/setup-android@v3 + - uses: actions/cache@v4 with: path: | @@ -30,13 +28,22 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- + + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@v4 + + - name: Check code format + run: ./gradlew spotlessCheck + + - uses: android-actions/setup-android@v3 - uses: nttld/setup-ndk@v1 id: setup-ndk with: ndk-version: r27 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v4 + - uses: Swatinem/rust-cache@v2 + with: + working-directory: jni/deltachat-core-rust - name: Compile core env: