Files
AndroidIDE/.github/workflows/android_workflow.yml
T
2022-06-21 13:39:26 +05:30

64 lines
1.7 KiB
YAML

name: Android CI
on:
push:
branches:
- main
- tooling-api
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.5.0
with:
access_token: ${{ github.token }}
- name: Clone repo
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11 # DO NOT CHANGE. Project must be built with JDK 11.
- name: Build project
uses: eskatos/gradle-command-action@v1
with:
arguments: clean build
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: Run tests
uses: eskatos/gradle-command-action@v1
with:
arguments: test
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: Generate translation report
uses: eskatos/gradle-command-action@v1
with:
arguments: :app:checkTranslations
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: Upload APK
uses: actions/upload-artifact@v2
if: ${{ !github.head_ref }}
with:
name: apk-debug
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload translation report
uses: actions/upload-artifact@v2
if: ${{ !github.head_ref }}
with:
name: translation-report
path: build/translation-reports/