-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (48 loc) · 1.32 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
42
43
44
45
46
47
48
49
50
51
name: Build
on:
workflow_dispatch:
push:
branches: [main*]
pull_request:
types: [opened, synchronize]
branches: [main*]
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
jobs:
build:
name: Build Java ${{ matrix.java }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java: [ '11' ]
os: [ 'ubuntu-18.04']
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Cache gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with gradle
run: ./gradlew build
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
path: build/reports/junit
name: Test Report