-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (41 loc) · 1.12 KB
/
rubocop.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
name: Rubocop
on:
pull_request:
branches: [ master, develop ]
paths-ignore:
- '**.md'
- 'doc/**/*'
- 'gemfiles/**/gems/**/*'
- 'measures/**/*'
- 'python/**/*'
- 'test/**/*'
- 'update_eplus_compare/**/*'
- 'weatherdata/**/*'
- 'model/refbuildingtests/measures/**/*'
jobs:
rubocop:
runs-on: ubuntu-20.04
steps:
- name: Checkout for PR
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR branch instead of the merge commit
- name: Checkout for push
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Run rubocop
id: rubocop
uses: jmarrec/rubocop-composite-action@v1
with:
autocorrect: true
commit-auto-correct: true
rubocop-version: 0.81.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}