-
Notifications
You must be signed in to change notification settings - Fork 92
57 lines (46 loc) · 1.37 KB
/
Copy pathci_review_pr.yml
File metadata and controls
57 lines (46 loc) · 1.37 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
55
56
57
name: Review PR with Danger
on:
pull_request:
branches: ["dev"]
types: [opened, synchronize, closed]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone main repo
uses: actions/checkout@v3
with:
fetch-depth: 100
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Set up Ruby 3.0
uses: actions/setup-ruby@v1
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Assemble debug build
run: ./gradlew clean assembleDebug
- name: Run Lint
run: ./gradlew lintDebug
- name: Run Detekt
run: ./gradlew detektAll
- name: Run Danger
run: |
gem install danger
bundle exec danger --verbose --dangerfile=Dangerfile --danger_id=danger-pr --fail-on-errors=true
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.REPO_KEY }}