Skip to content

Fixed outstanding project health issues #141

Fixed outstanding project health issues

Fixed outstanding project health issues #141

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- name: "Build project & run tests"
uses: gradle/gradle-build-action@v2
with:
arguments: |
build
projectHealth
mergeLintSarif
mergeDetektSarif
:plugins:buildPlugins
--continue
- name: "Verify publishing"
uses: gradle/gradle-build-action@v2
with:
arguments: publishToMavenLocal
- uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
with:
sarif_file: build/lint-merged.sarif
category: lint
- uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
with:
sarif_file: build/detekt-merged.sarif
category: detekt
- name: Upload failure artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: reports
path: |
**/build/reports/
!**/build/reports/dependency-analysis/
instrumentation-tests:
name: Instrumentation tests
runs-on: macOS-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- name: Pre build sources before launching emulator
run: ./gradlew compileDebugAndroidTestSources
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-29
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
api-level: 29
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
api-level: 29
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
adb logcat > logcat.out &
./gradlew connectedCheck
- name: Upload failed instrumentation artifacts
if: failure()
uses: actions/upload-artifact@v2
with:
name: instrumentation-failures
path: |
**/build/reports
logcat.out
check-documentation:
name: Check documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: cp CHANGELOG.md documentation/changelog.md
- run: pip install mkdocs-material
- run: mkdocs build --strict