Metacritic: adjust to new search URLs. #808
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: Android CI | |
# Avoid running this on the gh-pages branch | |
on: | |
push: | |
branches-ignore: | |
- "gh-pages" | |
pull_request: | |
branches-ignore: | |
- "gh-pages" | |
workflow_dispatch: # Allow running manually from web UI | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write # to publish unit test results | |
steps: | |
- name: Check out | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Gradle info | |
run: ./gradlew -version | |
# Note: Currently no difference between flavors or debug and release | |
# Note: running tests will also compile | |
- name: Build and run unit tests | |
run: ./gradlew :app:testPureDebugUnitTest | |
- name: Test Report | |
uses: dorny/test-reporter@afe6793191b75b608954023a46831a3fe10048d4 # v1.7.0 | |
if: always() # also run if tests failed | |
with: | |
name: JUnit Report | |
path: app/build/test-results/**/*.xml | |
reporter: java-junit | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
# To speed up lint check only run for release variant and only on app module | |
# Note: the app module has lintOptions.checkDependencies true, so submodules will be checked | |
# Source: https://groups.google.com/forum/#!topic/lint-dev/RGTvK_uHQGQ | |
# Note: running lint will also compile | |
- name: Lint goog release | |
run: ./gradlew :app:lintPureRelease | |
- name: Lint amzn release | |
if: ${{ contains(github.ref, 'release') }} | |
run: ./gradlew :app:lintAmazonRelease | |
- name: Upload lint reports | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: ${{ always() }} # also upload of lint errors | |
with: | |
name: Lint reports | |
path: | | |
app/build/reports/lint-results-pureRelease.html | |
app/build/reports/lint-results-amazonRelease.html |