Skip to content

Compose

Compose #100

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
jobs:
ANDROID_BASE_CHECKS:
name: Base Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: 'gradle'
- name: Perform base checks
run: ./gradlew app:assembleDebug --stacktrace
ANDROID_UNIT_TESTS:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: 'gradle'
- name: Execute unit tests
run: ./gradlew library:testDebugUnitTest --stacktrace
ANDROID_BUILD_APK:
name: Build APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# required for telegram notifications on PRs
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: 'gradle'
- name: Setup custom keystore file
run: |
mkdir -p $HOME/.android
cp ./.ci/debug.keystore $HOME/.android/debug.keystore
- name: Execute APK build
run: ./gradlew app:assembleDebug --stacktrace
- uses: actions/upload-artifact@v3
with:
name: apk-files
path: app/build/outputs/apk/**/*.apk
- name: Notify
# make sure this step runs, regardless of whether the preceding steps were successful or not
if: always()
env:
# "failure", "success" or "cancelled"
# see: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-context
RUN_RESULT: ${{ job.status }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
MATRIX_HOMESERVER: ${{ secrets.MATRIX_HOMESERVER }}
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_ACCESS_TOKEN }}
run: .ci/notify.sh