-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (41 loc) · 1.24 KB
/
build.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
name: "Build, lint, and test"
on: [pull_request, workflow_dispatch, push]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
test:
name: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Start emulator
timeout-minutes: 20
run: scripts/start_emulator.sh
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Check gradle version
run: ./gradlew --version
- name: Evaluate ktlint
run: ./gradlew ktlintCheck
- name: Evaluate Android linter
run: ./gradlew lint
- name: Run instrumentation tests
run: ./gradlew executeScreenshotTests
- uses: actions/upload-artifact@v2
if: always()
with:
name: Reports
path: app/build/reports/