-
Notifications
You must be signed in to change notification settings - Fork 59
97 lines (79 loc) · 2.88 KB
/
ci-mwcore.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI MwCore
on:
push:
branches: [ mwcore-dev ]
pull_request:
branches: [ mwcore-dev ]
env:
FHIRCORE_USERNAME: ${{ secrets.FHIRCORE_USERNAME }}
FHIRCORE_ACCESS_TOKEN: ${{ secrets.FHIRCORE_ACCESS_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
engine-tests:
runs-on: macos-latest
steps:
- name: Cancel Previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Decode google-services.json
run: echo $ENCODED_GOOGLE_SERVICES_JSON | base64 -d > android/quest/google-services.json
env:
ENCODED_GOOGLE_SERVICES_JSON: ${{ secrets.MWCORE_GOOGLE_SERVICES_JSON }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: android
- name: Spotless check engine module
run: ./gradlew :engine:spotlessCheck
working-directory: android
- name: Run Engine unit tests with Gradle
run: ./gradlew :engine:clean && ./gradlew :engine:jacocoTestReport -x :engine:testReleaseUnitTest --stacktrace
working-directory: android
- name: Upload Engine Test Report to codecov
uses: codecov/codecov-action@v3
with:
working-directory: android
flags: engine
files: engine/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
fail_ci_if_error: true
verbose: true
quest-tests:
runs-on: macos-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Decode google-services.json
run: echo $ENCODED_GOOGLE_SERVICES_JSON | base64 -d > android/quest/google-services.json
env:
ENCODED_GOOGLE_SERVICES_JSON: ${{ secrets.MWCORE_GOOGLE_SERVICES_JSON }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: android
- name: Spotless check quest application
run: ./gradlew :quest:spotlessCheck
working-directory: android
- name: Run Quest unit tests with Gradle
run: ./gradlew :quest:clean && ./gradlew :quest:jacocoTestReportMwcoreDebug -x :quest:testMwcoreReleaseUnitTest --stacktrace
working-directory: android
- name: Upload Quest Test Report to codecov
uses: codecov/codecov-action@v3
with:
working-directory: android
flags: quest
files: quest/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
fail_ci_if_error: false
verbose: true