-
Notifications
You must be signed in to change notification settings - Fork 24
64 lines (62 loc) · 2.51 KB
/
test-workflow.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
name: PR Test Workflow
on:
push:
branches:
- master
defaults:
run:
shell: bash
jobs:
test:
name: Instrumented and Unit Tests
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create .properties Files # create local.properties and sentry.properties
run: |
rm -f local.properties
rm -f sentry.properties
touch local.properties
echo 'sdk.dir=/Users/runner/Library/Android/sdk' >> local.properties
echo 'ndk.dir=/Users/runner/Library/Android/sdk/ndk/20.1.5948944' >> local.properties
touch sentry.properties
echo "$SENTRY_PROPERTIES" >> sentry.properties
echo ".properties files created."
env:
SENTRY_PROPERTIES: ${{ secrets.SENTRY_PROPERTIES }}
- name: Run Instrumented Tests # run all instrumented tests through the FFITestSuite class
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 24
ndk: 20.1.5948944
cmake: 3.10.2.4988404
arch: x86_64
emulator-options: -no-snapshot -wipe-data -no-boot-anim -no-window -no-audio -gpu swiftshader_indirect -camera-back none -camera-front none
script: ./gradlew connectedRegularDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.tari.android.wallet.FFITestSuite
- name: Upload Intrumented Test Reports
uses: actions/upload-artifact@v2
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status.
with:
name: instrumented_test_reports
path: app/build/outputs/androidTest-results/connected/flavors/REGULAR # This folder contains test result XML files.
- name: Run Unit Tests
run: ./gradlew test
- name: Upload Unit Test Reports
uses: actions/upload-artifact@v2
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status.
with:
name: unit_test_reports
path: app/build/test-results # This folder contains test result XML files.
test-report:
name: Display Unit Test Reports
runs-on: ubuntu-latest
needs: test # The report job will run after test job.
if: ${{ always() }} # IMPORTANT: Execute report job regardless of status.
steps:
- name: Download Unit Test Reports
uses: actions/download-artifact@v2
with:
name: unit_test_reports
- name: Display Test Reports
uses: asadmansr/[email protected]