-
Notifications
You must be signed in to change notification settings - Fork 18
73 lines (59 loc) · 1.84 KB
/
build_test_check.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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: build-test-check
on:
pull_request:
push:
branches: [ main ]
workflow_dispatch:
inputs:
name:
description: 'manual build trigger'
home:
description: 'location'
required: false
jobs:
build-test-and-check:
runs-on: ubuntu-latest
strategy:
matrix:
projects: [ FoldingVideo, FoldingVideoPlusChat, FoldingVideoPlusTrivia, PhotoEditor, EBookReader, PhotoEditor, SourceEditor, TravelPlanner, TwoDo, TwoNote ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache gradle packages
uses: actions/cache@v2
with:
path: ${{matrix.projects}}/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x ${{matrix.projects}}/gradlew
- name: clean
run: |
cd ${{matrix.projects}}
./gradlew clean --info
- name: assemble debug
run: |
cd ${{matrix.projects}}
./gradlew assembleDebug --info
- name: unit tests
run: |
cd ${{matrix.projects}}
./gradlew testDebugUnitTest --info
- name: build instrumentation tests
run: |
cd ${{matrix.projects}}
./gradlew assembleAndroidTest
- name: lint
run: |
cd ${{matrix.projects}}
./gradlew lintDebug --info
- name: ktlint
run: |
cd ${{matrix.projects}}
./gradlew ktlint --info