Skip to content

Merge pull request #945 from UweTrottmann/897-similar-movies #714

Merge pull request #945 from UweTrottmann/897-similar-movies

Merge pull request #945 from UweTrottmann/897-similar-movies #714

name: Android CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Gradle Info
run: ./gradlew -version
- name: Assemble Debug Variant
run: ./gradlew assembleDebug
# Note: Currently no difference between flavors or debug and release
- name: Run Unit Tests
run: ./gradlew :app:testPureDebugUnitTest
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always() # also run if build step failed
with:
junit_files: app/build/test-results/**/*.xml
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
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
- name: Lint Release Variants
run: ./gradlew :app:lintPureRelease :app:lintAmazonRelease
- uses: actions/upload-artifact@v3
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