-
Notifications
You must be signed in to change notification settings - Fork 31
64 lines (57 loc) · 1.72 KB
/
pr.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
name: pr
on:
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]
runs-on: ${{matrix.os}}
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache konan
uses: actions/cache@v1
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
# Danger
- name: Setup Ruby
if: matrix.os == 'ubuntu-latest'
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install bundler
if: matrix.os == 'ubuntu-latest'
run: gem install bundler
- name: Cache bundle
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v1
with:
path: vendor/bundle
key: ruby-bundle-${{ hashFiles('Gemfile.lock') }}
- name: bundle install
if: matrix.os == 'ubuntu-latest'
run: bundle install --path=vendor/bundle
- name: Danger
if: matrix.os == 'ubuntu-latest'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
run: bundle exec danger --fail-on-errors=true &> /dev/null
- name: Build
run: ./gradlew build --no-daemon --stacktrace
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"