Skip to content

Commit 0f6d2b4

Browse files
committed
DEV: Move linting to a seperate workflow to fix the build
We don't need to be running rubocop and stree multiple times
1 parent bca2229 commit 0f6d2b4

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ jobs:
3939
bundler: latest
4040
bundler-cache: true
4141

42-
- name: Rubocop
43-
run: bundle exec rubocop
44-
45-
- name: Syntax tree
46-
run: bundle exec stree check Gemfile $(git ls-files '*.rb') $(git ls-files '*.rake') $(git ls-files '*.thor')
47-
4842
- name: Run tests
4943
run: bundle exec rake
5044

.github/workflows/linting.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: 3.4
21+
bundler: latest
22+
bundler-cache: true
23+
24+
- name: Rubocop
25+
run: bundle exec rubocop
26+
27+
- name: Syntax tree
28+
run: bundle exec stree check Gemfile $(git ls-files '*.rb') $(git ls-files '*.rake') $(git ls-files '*.thor')

prometheus_exporter.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
3434
spec.add_development_dependency "minitest-stub-const", "~> 0.6"
3535
spec.add_development_dependency "rubocop-discourse", ">= 3"
3636
spec.add_development_dependency "appraisal", "~> 2.3"
37-
spec.add_development_dependency "activerecord", "~> 6.0.0"
37+
spec.add_development_dependency "activerecord", "~> 7.1"
3838
spec.add_development_dependency "redis", "> 5"
3939
spec.add_development_dependency "m"
4040
spec.add_development_dependency "syntax_tree"

0 commit comments

Comments
 (0)