Skip to content

Commit

Permalink
CI: Breakout jobs and support Ruby 3.3.0
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.
  • Loading branch information
stevepolitodesign committed Mar 26, 2024
1 parent e7926f1 commit b0ec411
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 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
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 b0ec411

Please sign in to comment.