Update AGP to 9 #1616
Workflow file for this run
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: Checks | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| env: | |
| GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx3g -XX:+UseParallelGC" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| # Read cache in PRs, write to cache after merge to main or develop | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} | |
| - name: Build and Test | |
| run: ./gradlew assembleDebug testDebugUnitTest lintDebug | |
| lint-kt: | |
| name: Lint Kotlin | |
| runs-on: macos-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| - name: Lint | |
| run: ./gradlew ktlintCheck | |
| lint-legacy-js: | |
| name: Lint JavaScript | |
| runs-on: macos-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| env: | |
| scripts: ${{ 'readium/navigator/src/main/assets/_scripts' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: readium/navigator/src/main/assets/_scripts/package.json | |
| run_install: false | |
| - name: Setup cache | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: readium/navigator/src/main/assets/_scripts/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm --dir "$scripts" install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm --dir "$scripts" run lint | |
| - name: Check formatting | |
| run: pnpm --dir "$scripts" run checkformat | |
| - name: Check if bundled scripts are up-to-date | |
| run: | | |
| make scripts-legacy | |
| git diff --exit-code --name-only src/main/assets/readium/scripts/*.js | |
| lint-new-ts: | |
| name: Lint TypeScript | |
| runs-on: macos-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| env: | |
| scripts: ${{ 'readium/navigators/web/internals/scripts' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: readium/navigators/web/internals/scripts/package.json | |
| run_install: false | |
| - name: Setup cache | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: readium/navigators/web/internals/scripts/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm --dir "$scripts" install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm --dir "$scripts" run lint | |
| - name: Check formatting | |
| run: pnpm --dir "$scripts" run checkformat | |
| - name: Check if bundled scripts are up-to-date | |
| run: | | |
| make scripts-new | |
| git diff --exit-code --name-only readium/navigators/web/internals/src/main/assets/* |