-
Notifications
You must be signed in to change notification settings - Fork 13
60 lines (57 loc) · 1.82 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
57
58
59
name: Test
on:
push:
branches:
- main
pull_request:
env:
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPR_USER: ${{ secrets.GITHUB_ACTOR }}
jobs:
library-unit:
name: Library (Unit Tests)
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Start local test server
run: docker-compose -p xmtp -f dev/local/docker-compose.yml up -d
- name: Gradle Run Unit Tests
run: ./gradlew library:testDebug
- name: Stop local test server
run: docker-compose -p xmtp -f dev/local/docker-compose.yml down
library-integration:
name: Library (Integration Tests)
runs-on: macos-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up Docker
run: brew install docker docker-compose
- name: Start Colima
run: colima start
- name: Start local test server
run: docker-compose -p xmtp -f dev/local/docker-compose.yml up -d
- name: Gradle Run Integration Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew connectedCheck
- name: Stop local test server
run: docker-compose -p xmtp -f dev/local/docker-compose.yml down