forked from AndroidIDEOfficial/AndroidIDE
-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (53 loc) · 1.58 KB
/
android_workflow.yml
File metadata and controls
63 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Android CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: {}
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.10.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@v2
with:
arguments: clean build --stacktrace
- name: Run tests
uses: eskatos/gradle-command-action@v2
with:
arguments: test
- name: Generate translation report
uses: eskatos/gradle-command-action@v2
with:
arguments: :app:checkTranslations
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: "./**/build/test-results/**/*.xml"
- name: Upload APK
uses: actions/upload-artifact@v3
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@v3
if: ${{ !github.head_ref }}
with:
name: translation-report
path: build/translation-reports/