-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (57 loc) · 1.83 KB
/
ci.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
name: CI
on:
pull_request:
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.gradle/jdks
~/.konan
~/.android/build-cache
~/.android/cache
key: ${{ runner.os }}-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- run: ./gradlew assemble
- run: ./gradlew --continue check
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-failure
path: '**/build/reports/tests/'
retention-days: 5
- run: |
set -o xtrace
if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then
./gradlew \
-PVERSION_NAME="unspecified" \
-PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}" \
-PsigningInMemoryKeyPassword="${{ secrets.SIGNING_PASSWORD }}" \
publishToMavenLocal
else
./gradlew \
-PVERSION_NAME="unspecified" \
-PRELEASE_SIGNING_ENABLED=false \
publishToMavenLocal
fi
- run: ./gradlew jacocoTestReport
- uses: EnricoMi/publish-unit-test-result-action/composite@v2
with:
junit_files: '**/build/test-results/**/*.xml'
report_individual_runs: 'true'
- uses: codecov/codecov-action@v3
- run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties