Skip to content

Bump actions/checkout from 3 to 4 #730

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #730

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
permissions:
checks: write # to publish unit test results
steps:
- uses: actions/checkout@v4
- 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
# https://github.com/EnricoMi/publish-unit-test-result-action#configuration
if: always() # also run if build step failed
with:
comment_mode: off # do not create comment on pull requests
junit_files: app/build/test-results/**/*.xml
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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