-
Notifications
You must be signed in to change notification settings - Fork 6
109 lines (107 loc) · 3.71 KB
/
readme.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
98
99
100
101
102
103
104
105
106
107
108
109
name: Assemble project
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate binary compatibility
run: ./gradlew apiCheck
- name: Build library
run: ./gradlew :parsely:assembleDebug
- name: Build example app
run: ./gradlew :example:assembleDebug
- name: Android Lint
run: ./gradlew lintDebug
- name: Android Unit Tests
run: ./gradlew :parsely:testDebugUnitTest
- name: Generate XML coverage report
run: ./gradlew :parsely:koverXmlReportDebug
- uses: codecov/codecov-action@v3
with:
files: parsely/build/reports/kover/reportDebug.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Validate Maven publication
run: ./gradlew :parsely:publishReleasePublicationToMavenLocal
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: artifact
path: ~/.m2/repository/com/parsely/parsely/*
functional-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: .
api-level: 31
profile: Nexus 6
arch: x86_64
force-avd-creation: false
avd-name: macOS-avd-x86_64-31
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
disk-size: 4096M
script: echo "Generated AVD snapshot for caching."
- name: Functional Tests
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: .
api-level: 31
profile: Nexus 6
arch: x86_64
force-avd-creation: false
avd-name: macOS-avd-x86_64-31
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
disk-size: 4096M
script: adb uninstall "com.parsely.parselyandroid.test"; ./gradlew :parsely:connectedDebugAndroidTest
- name: Publish build artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: artifact
path: |
./parsely/build/reports/*
./parsely/build/outputs/androidTest-results