-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (117 loc) · 3.48 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: ReviewDog
on:
pull_request:
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
rubocop_version: gemfile
rubocop_flags: -a
rubocop_extensions: rubocop-capybara:gemfile rubocop-factory_bot:gemfile rubocop-rails:gemfile rubocop-rspec:gemfile rubocop-performance:gemfile
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
fail_on_error: true
- name: Notify slack build result
uses: lazy-actions/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: '*ReviewDog Rubocop*'
mention: 'here'
username: 'GitHub Actions'
icon_emoji: 'dog'
mention_if: 'failure'
channel: '#ember-rails-todo-app'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
brakeman:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.5
- name: brakeman
uses: reviewdog/action-brakeman@v2
with:
brakeman_version: gemfile
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
- name: Notify slack build result
uses: lazy-actions/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: '*ReviewDog Brakeman*'
mention: 'here'
username: 'GitHub Actions'
icon_emoji: 'dog'
mention_if: 'failure'
channel: '#ember-rails-todo-app'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: "ember/todo-app/package.json"
- name: install ember-cli
run: yarn global add ember-cli
- name: Setup Ember.js App and eslint formatter
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
cd ember/todo-app
yarn install --frozen-lockfile
yarn add eslint-formatter-rdjson -D
- name: Run reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
cd ember/todo-app
yarn --silent run eslint -f rdjson . | reviewdog -f=rdjson -reporter=github-pr-review
- name: Notify slack build result
uses: lazy-actions/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: '*ReviewDog eslint*'
mention: 'here'
username: 'GitHub Actions'
icon_emoji: 'dog'
mention_if: 'failure'
channel: '#ember-rails-todo-app'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
reek:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Use ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: reek
uses: reviewdog/action-reek@v1
with:
reek_version: gemfile
reporter: github-pr-review