-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 2.29 KB
/
test.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
name: Build and Test
on:
push:
branches: [ "develop", "main" ]
pull_request:
types: [ opened, synchronize ]
jobs:
build:
name: Build and Test
# if you fork this repo, you should change this to ubuntu-latest
# you should also disable ipv6 tests, and the android tests
# (the self-hosted tests have ipv6 on the host and a phone attached to the runner)
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: set up JDK
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and Publish the Common Library to the local Maven repository
run: ./gradlew :icmp-common:publishToMavenLocal
- name: Build and Publish the Android and Linux Libraries to the local Maven repository
run: ./gradlew :icmp-android:publishToMavenLocal :icmp-linux:publishToMavenLocal
- name: Build with Gradle
run: ./gradlew assemble # we don't use build because that will run the tests, we want that separate
- name: JVM Unit tests
run: ./gradlew check
- name: Android Instrumented tests # disable if you don't have a phone attached to the runner
run: ./gradlew connectedCheck
- name: Upload ICMP Common Unit Tests Report to CodeCov
# https://github.com/codecov/codecov-action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: commonunittests
files: ./icmp-common/build/reports/jacoco/test/jacocoTestReport.xml
- name: Upload ICMP Linux Unit Tests Report to CodeCov
# https://github.com/codecov/codecov-action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: linuxunittests
files: ./icmp-linux/build/reports/jacoco/test/jacocoTestReport.xml
- name: Upload Instrumented Tests Report to CodeCov
# https://github.com/codecov/codecov-action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: instrumentedtests
files: ./icmp-android/build/reports/coverage/androidTest/debug/connected/report.xml