Skip to content

Commit 689fad0

Browse files
author
Nguyen Van A
committed
Add CI Rubocop
1 parent 48ee34a commit 689fad0

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: RuboCop Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
rubocop:
13+
name: RuboCop Check
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
# Lấy code từ repo
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
# Cài Ruby 3.2.2
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: 3.2.2
26+
bundler-cache: true # Tự động cache gem
27+
28+
# Cài đặt gem theo Gemfile (bundle install)
29+
- name: Install dependencies
30+
run: bundle install --jobs 4 --retry 3
31+
32+
# Chạy RuboCop với config chỉ định
33+
- name: Run RuboCop
34+
run: bundle exec rubocop --parallel --config .rubocop.yml

0 commit comments

Comments
 (0)