-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (63 loc) · 1.76 KB
/
build_test.yml
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
64
65
66
67
68
name: Build and Test
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
local_test_job:
name: Running Local Tests
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v2.4.2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Print Java version
run: javac -version
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Restore Cache
uses: actions/cache@v3.0.6
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Debug Tests
run: ./gradlew testDebugUnitTest --continue
- name: Upload Test Reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test-reports
path: '**/build/reports/tests/'
build_job:
name: Building the apk
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v2.4.2
- name: Restore Cache
uses: actions/cache@v3.0.6
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Assemble Debug
run: ./gradlew assembleDebug
- name: Upload Apk
uses: actions/upload-artifact@v2
with:
name: apk
path: app/build/outputs/apk/debug/**.apk