|
| 1 | +name: Pull request checks |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + paths-ignore: |
| 5 | + - '.idea/**' |
| 6 | + - '.gitattributes' |
| 7 | + - '.github/**.json' |
| 8 | + - '.gitignore' |
| 9 | + - '.gitmodules' |
| 10 | + - '**.md' |
| 11 | + - 'LICENSE' |
| 12 | + - 'NOTICE' |
| 13 | + |
| 14 | +env: |
| 15 | + CI_CHECK_RELEASE_BUILDS: 'false' |
| 16 | + |
| 17 | +permissions: |
| 18 | + contents: read |
| 19 | + |
| 20 | +concurrency: |
| 21 | + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.number || 'no-pr' }} |
| 22 | + cancel-in-progress: true |
| 23 | + |
| 24 | +jobs: |
| 25 | + build-k9: |
| 26 | + name: Build K9 application |
| 27 | + runs-on: ubuntu-latest |
| 28 | + timeout-minutes: 90 |
| 29 | + steps: |
| 30 | + - name: Checkout the repo |
| 31 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 32 | + |
| 33 | + - name: Prepares environment |
| 34 | + uses: ./.github/actions/setup |
| 35 | + |
| 36 | + - name: Build K9 application |
| 37 | + run: ./gradlew :app-k9mail:assemble |
| 38 | + |
| 39 | + build-thunderbird: |
| 40 | + name: Build Thunderbird application |
| 41 | + runs-on: ubuntu-latest |
| 42 | + timeout-minutes: 90 |
| 43 | + steps: |
| 44 | + - name: Checkout the repo |
| 45 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 46 | + |
| 47 | + - name: Prepares environment |
| 48 | + uses: ./.github/actions/setup |
| 49 | + |
| 50 | + - name: Build Thunderbird application |
| 51 | + run: ./gradlew :app-thunderbird:assemble |
| 52 | + |
| 53 | + build-app-ui-catalog: |
| 54 | + name: Build App UI-catalog application |
| 55 | + runs-on: ubuntu-latest |
| 56 | + timeout-minutes: 90 |
| 57 | + steps: |
| 58 | + - name: Checkout the repo |
| 59 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 60 | + |
| 61 | + - name: Prepares environment |
| 62 | + uses: ./.github/actions/setup |
| 63 | + |
| 64 | + - name: Build App UI-catalog application in Debug mode |
| 65 | + run: ./gradlew :app-ui-catalog:assembleDebug |
| 66 | + |
| 67 | + build-cli-tools: |
| 68 | + name: Build CLI tools if needed |
| 69 | + runs-on: ubuntu-latest |
| 70 | + timeout-minutes: 90 |
| 71 | + steps: |
| 72 | + - name: Check if CLI tools are changed |
| 73 | + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 |
| 74 | + id: changes |
| 75 | + with: |
| 76 | + filters: | |
| 77 | + cli_tools_changed: |
| 78 | + - 'cli/**' |
| 79 | + - name: Build CLI tools |
| 80 | + # run only if CLI tools were changed |
| 81 | + if: steps.changes.outputs.cli_tools_changed == 'true' |
| 82 | + run: ./gradlew buildCliTools |
| 83 | + |
| 84 | + lint: |
| 85 | + name: Quality - Lint |
| 86 | + runs-on: ubuntu-latest |
| 87 | + timeout-minutes: 90 |
| 88 | + steps: |
| 89 | + - name: Checkout the repo |
| 90 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 91 | + |
| 92 | + - name: Prepares environment |
| 93 | + uses: ./.github/actions/setup |
| 94 | + |
| 95 | + - name: Running Android lint |
| 96 | + run: ./gradlew lint |
| 97 | + |
| 98 | + spotless: |
| 99 | + name: Quality - Spotless |
| 100 | + runs-on: ubuntu-latest |
| 101 | + timeout-minutes: 90 |
| 102 | + steps: |
| 103 | + - name: Checkout the repo |
| 104 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 105 | + |
| 106 | + - name: Prepares environment |
| 107 | + uses: ./.github/actions/setup |
| 108 | + |
| 109 | + - name: Running spotless check |
| 110 | + run: ./gradlew spotlessCheck |
| 111 | + |
| 112 | + detekt: |
| 113 | + name: Quality - Detekt |
| 114 | + runs-on: ubuntu-latest |
| 115 | + timeout-minutes: 90 |
| 116 | + steps: |
| 117 | + - name: Checkout the repo |
| 118 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 119 | + |
| 120 | + - name: Prepares environment |
| 121 | + uses: ./.github/actions/setup |
| 122 | + |
| 123 | + - name: Running Detekt |
| 124 | + run: ./gradlew detekt |
| 125 | + |
| 126 | + - name: Running Detekt including KMP |
| 127 | + # As we were not verifying detekt in KMP sources before, |
| 128 | + # this step is likely to fail. |
| 129 | + continue-on-error: true |
| 130 | + run: | |
| 131 | + ./gradlew detektMetadataCommonMain |
| 132 | + ./gradlew detektMetadataMain |
| 133 | + ./gradlew detektMetadataCommonJvmMain |
| 134 | +
|
| 135 | + unit-test: |
| 136 | + name: Quality - Unit tests |
| 137 | + runs-on: ubuntu-latest |
| 138 | + timeout-minutes: 90 |
| 139 | + steps: |
| 140 | + - name: Checkout the repo |
| 141 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 142 | + |
| 143 | + - name: Prepares environment |
| 144 | + uses: ./.github/actions/setup |
| 145 | + |
| 146 | + - name: Running unit tests |
| 147 | + run: ./gradlew testDebugUnitTest --parallel |
| 148 | + |
| 149 | + dependency-guard: |
| 150 | + name: Quality - Dependency Guard |
| 151 | + runs-on: ubuntu-latest |
| 152 | + timeout-minutes: 90 |
| 153 | + steps: |
| 154 | + - name: Checkout the repo |
| 155 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 156 | + |
| 157 | + - name: Prepares environment |
| 158 | + uses: ./.github/actions/setup |
| 159 | + |
| 160 | + - name: Running Dependency Guard |
| 161 | + run: ./gradlew dependencyGuard |
| 162 | + |
| 163 | + check-badging: |
| 164 | + name: Quality - Badging |
| 165 | + runs-on: ubuntu-latest |
| 166 | + timeout-minutes: 90 |
| 167 | + steps: |
| 168 | + - name: Checkout the repo |
| 169 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 170 | + |
| 171 | + - name: Prepares environment |
| 172 | + uses: ./.github/actions/setup |
| 173 | + |
| 174 | + - name: Running K9 Badging |
| 175 | + run: | |
| 176 | + ./gradlew :app-k9mail:checkFossReleaseBadging \ |
| 177 | + :app-k9mail:checkFullReleaseBadging \ |
| 178 | + -x assemble \ |
| 179 | + -x build |
| 180 | +
|
| 181 | + - name: Running Thunderbird Badging |
| 182 | + run: | |
| 183 | + ./gradlew :app-thunderbird:checkFossBetaBadging \ |
| 184 | + :app-thunderbird:checkFossDailyBadging \ |
| 185 | + :app-thunderbird:checkFossReleaseBadging \ |
| 186 | + :app-thunderbird:checkFullBetaBadging \ |
| 187 | + :app-thunderbird:checkFullDailyBadging \ |
| 188 | + :app-thunderbird:checkFullReleaseBadging \ |
| 189 | + -x assemble \ |
| 190 | + -x build |
0 commit comments