generated from happiness-chain/rails_template
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (56 loc) · 1.89 KB
/
reviewdog.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
name: reviewdog
on: [pull_request]
permissions:
actions: write
checks: write
contents: write
issues: write
pull-requests: write
statuses: write
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup reviewdog
run: |
curl -OL https://github.com/reviewdog/reviewdog/releases/download/v0.14.1/reviewdog_0.14.1_Linux_x86_64.tar.gz
tar -zxvf reviewdog_0.14.1_Linux_x86_64.tar.gz
mkdir -p $HOME/bin
mv reviewdog $HOME/bin/
echo "$HOME/bin/" >> $GITHUB_PATH
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run rubocop with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: reviewdog --conf=./.reviewdog.yml -reporter=github-pr-check
rails_best_practices:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup reviewdog
run: |
curl -OL https://github.com/reviewdog/reviewdog/releases/download/v0.14.1/reviewdog_0.14.1_Linux_x86_64.tar.gz
tar -zxvf reviewdog_0.14.1_Linux_x86_64.tar.gz
mkdir -p $HOME/bin
mv reviewdog $HOME/bin/
echo "$HOME/bin/" >> $GITHUB_PATH
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run rails best practice with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bundle exec rails_best_practices --without-color --silent . | reviewdog -efm="%f:%l - %m" -efm="%-G%.%#" \
-name="rails_best_practices" \
-reporter="github-pr-check" \
-filter-mode="nofilter" \
-fail-on-error="true" \
-level="info"