-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.94 KB
/
build.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
name: Android CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Decode keystore
env:
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }}
run: |
KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${KEYSTORE_FILE_PATH}"
echo $ENCODED_KEYSTORE | base64 -di > "${KEYSTORE_FILE_PATH}"/demo-keystore.jks
- name: Build with Gradle
run: ./gradlew clean lintDebug assembleRelease
env:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
path: |
./payment-demo/build/outputs/apk/
./**/build/reports/lint-results.xml
./**/build/reports/lint-results-*.html
- name: Clean up keystore
run: rm -r "${RUNNER_TEMP}/keystore/demo-keystore.jks"
- name: Verification
run: ./gradlew testDebug
- name: Upload code coverage results
uses: actions/upload-artifact@v3
with:
path: ./**/build/test-results/**/TEST-*.xml
- name: Show test summary
uses: test-summary/action@v2
with:
paths: ./**/build/test-results/**/TEST-*.xml
if: always()