-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.58 KB
/
pull_request.yml
File metadata and controls
54 lines (52 loc) · 1.58 KB
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
name: Pull Request
on: pull_request
jobs:
unit-test:
name: Build and run checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Cache Gradle
if: always()
uses: actions/cache@v1.2.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Cache gems
if: always()
uses: actions/cache@v1.2.0
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('.github/Gemfile') }}
restore-keys: ${{ runner.os }}-gems-
- name: Gradle - build, test, coverage
run: |
echo "::add-matcher::.github/gradle-java-matcher.json"
echo "::add-matcher::.github/kotlin-error-matcher.json"
echo "::add-matcher::.github/kotlin-warning-matcher.json"
./gradlew check jacocoTestReport --no-daemon -Dorg.gradle.daemon=false
- name: Run Danger
if: always()
uses: MeilCli/danger-action@v5
with:
plugins_file: '.github/Gemfile'
install_path: 'vendor/bundle'
danger_file: '.github/Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports
path: '**/build/reports/tests/'