Skip to content

Discover filter: prepare to get show genres #1000

Discover filter: prepare to get show genres

Discover filter: prepare to get show genres #1000

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
# Only run on pushes or if pull request from fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
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@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.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@eaa763f6ffc21c7a37837f56cd5f9737f27fc6c8 # v1.8.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
# Only run on pushes or if pull request from fork
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Check out
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
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