From a40d457b74e22c501a1a47ffb5f4369e73adf852 Mon Sep 17 00:00:00 2001 From: Steve Polito Date: Tue, 26 Mar 2024 05:36:58 -0400 Subject: [PATCH] CI: Breakout jobs and support Ruby 3.3.0 (#1178) 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`. --- .github/workflows/main.yml | 27 ++++++++++++------- .ruby-version | 2 +- Gemfile.lock | 11 ++++---- .../suspenders/lint_generator_test.rb | 1 + 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1656b7503..5f20d0cdc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.ruby-version b/.ruby-version index acf9bf09d..15a279981 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 \ No newline at end of file +3.3.0 diff --git a/Gemfile.lock b/Gemfile.lock index a91880dee..7287ff99c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -230,7 +230,8 @@ GEM zeitwerk (2.6.12) PLATFORMS - ruby + arm64-darwin-23 + x86_64-linux DEPENDENCIES mocha diff --git a/test/generators/suspenders/lint_generator_test.rb b/test/generators/suspenders/lint_generator_test.rb index 13b2608a2..30520f7c4 100644 --- a/test/generators/suspenders/lint_generator_test.rb +++ b/test/generators/suspenders/lint_generator_test.rb @@ -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"