#160 chore: update androidx.lifecycle to v2.11.0 #259
This file contains hidden or 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: pull-request-build | |
| run-name: "#${{ github.event.pull_request.number}} ${{ github.event.pull_request.title}}" | |
| on: | |
| pull_request: | |
| types: [ 'opened', 'reopened', 'synchronize' ] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| build-app: | |
| runs-on: "ubuntu-latest" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| # Preparation | |
| - name: Install screenshot test dependencies | |
| run: "sudo apt-get install -y libfreetype6 fontconfig fonts-dejavu" | |
| - name: Globally enable build cache and parallel execution | |
| run: | | |
| mkdir -p ~/.gradle | |
| cat >> ~/.gradle/gradle.properties<< EOF | |
| org.gradle.caching=true | |
| org.gradle.parallel=true | |
| EOF | |
| - name: Force all tasks to be rerun when debug mode is on | |
| # This allows us to force rerun the build if cache has gotten corrupted | |
| run: 'if [[ "${{ runner.debug }}" == "1" ]]; then | |
| echo "GLOBAL_FLAGS= --rerun-tasks" >> "$GITHUB_ENV"; | |
| else | |
| echo "GLOBAL_FLAGS=" >> "$GITHUB_ENV"; | |
| fi | |
| ' | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| lfs: true | |
| submodules: recursive | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: '21' | |
| distribution: temurin | |
| - uses: burrunan/gradle-cache-action@663fbad34e03c8f12b27f4999ac46e3d90f87eca | |
| with: | |
| debug: false | |
| concurrent: true | |
| read-only: true | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 | |
| - run: sdkmanager "platforms;android-33" "platforms;android-34" | |
| # Build | |
| - name: Compile app | |
| run: "./gradlew compileReleaseKotlin assembleDebug$GLOBAL_FLAGS" | |
| env: | |
| RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }} | |
| RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }} | |
| # Tests | |
| - name: Compile Unit Tests | |
| run: "./gradlew compileDebugUnitTestSources compileReleaseUnitTestSources" | |
| - name: Lint | |
| run: "./gradlew lintRelease runDebugDetekt assertModuleGraph buildHealth detectTooManyFiles reportMerge --continue" | |
| - name: Run Unit Tests | |
| run: "./gradlew runDebugTests -x :app-screenshot-tests:testDebugUnitTest -x :app-screenshot-tests:testReleaseUnitTest --continue" | |
| - name: "Run Screenshot Tests" | |
| run: "./gradlew --continue verifyPaparazziDebug" | |
| # Handoff results to the pull-request-post workflow | |
| - run: echo ${{ github.event.number }} > pr_number.txt | |
| if: (!cancelled()) | |
| - name: Upload Results | |
| if: (!cancelled()) | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: results | |
| path: | | |
| **/build/outputs/*-results/**/*.xml | |
| **/build/*-results/**/*.xml | |
| pr_number.txt | |
| ${{ github.event_path }} | |
| merge.sarif | |
| - name: "Upload Screenshot test failures" | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() | |
| with: | |
| name: failed-screenshot-tests | |
| path: app-screenshot-tests/build/paparazzi/failures |