Skip to content

Commit

Permalink
CI: Breakout jobs and support Ruby 3.3.0 (#1178)
Browse files Browse the repository at this point in the history
Separate out lint and test jobs to make CI more clear. Drop matrix
support, and instead update the local Ruby version to the latest version
`3.3.0`, and use that in CI.

Also updates test to ignore generated file that should have been
ignored.

Ran `bundle install` to rebuild `Gemfile.lock`.
  • Loading branch information
stevepolitodesign authored Mar 26, 2024
1 parent e7926f1 commit a40d457
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,28 @@ on:
pull_request:

jobs:
build:
lint:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.1.4'
- '3.2.2'

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the default task
run: bundle exec rake

- name: Lint
run: bin/rails standard

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run tests
run: bin/rails test
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.0
11 changes: 6 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ GEM
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.4-arm64-darwin)
nokogiri (1.16.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
nokogiri (1.16.3-x86_64-linux)
racc (~> 1.4)
parallel (1.23.0)
parser (3.2.2.4)
Expand Down Expand Up @@ -203,8 +203,8 @@ GEM
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sqlite3 (1.6.7-arm64-darwin)
sqlite3 (1.6.7-x86_64-linux)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86_64-linux)
standard (1.31.2)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
Expand All @@ -230,7 +230,8 @@ GEM
zeitwerk (2.6.12)

PLATFORMS
ruby
arm64-darwin-23
x86_64-linux

DEPENDENCIES
mocha
Expand Down
1 change: 1 addition & 0 deletions test/generators/suspenders/lint_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def restore_destination
remove_file_if_exists ".stylelintrc.json"
remove_file_if_exists ".eslintrc.json"
remove_file_if_exists ".prettierrc"
remove_file_if_exists ".prettierignore"
remove_file_if_exists "package.json"
remove_file_if_exists ".erb-lint.yml"
remove_file_if_exists "config/better_html.yml"
Expand Down

0 comments on commit a40d457

Please sign in to comment.