diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b3fffd..fc98906 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", "head"] + ruby: ["3.2", "3.3", "3.4", "4.0", "head"] steps: - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 @@ -31,3 +31,38 @@ jobs: - run: git config --global user.name 'github-actions[bot]' - run: git config --global user.email 'github-actions[bot]@users.noreply.github.com' - run: bundle exec rake test + test-legacy: + name: "Test / Ruby ${{ matrix.ruby }}" + runs-on: ubuntu-latest + strategy: + matrix: + ruby: ["2.7", "3.0", "3.1"] + env: + BUNDLE_GEMFILE: gemfiles/legacy.gemfile + steps: + - uses: actions/checkout@v7 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + bundler: latest + - run: git config --global user.name 'github-actions[bot]' + - run: git config --global user.email 'github-actions[bot]@users.noreply.github.com' + - run: | + # Work around hard-coded expectation of gemfile location + cp ${BUNDLE_GEMFILE} Gemfile + cp ${BUNDLE_GEMFILE}.lock Gemfile.lock + sed -i 's/path: "\.\."/path: "."/' Gemfile + - run: bundle exec rake test + test-all: + name: "Test / All" + runs-on: ubuntu-latest + needs: test + if: always() + steps: + - name: All tests ok + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: Some tests failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 diff --git a/.gitignore b/.gitignore index 4e0f123..769cb44 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /spec/reports/ /tmp/ /Gemfile.lock +/gemfiles/*.lock diff --git a/Gemfile b/Gemfile index ff872d7..f985cb7 100644 --- a/Gemfile +++ b/Gemfile @@ -3,9 +3,8 @@ source "https://rubygems.org" gemspec -gem "activesupport", "~> 7.1.3" # Needed for factory_bot 6.3 gem "cgi" # Needed for vcr on Ruby 3.5+ -gem "factory_bot", "~> 6.3.0" +gem "factory_bot", "~> 6.6.0" gem "irb" gem "megatest", "~> 0.11.0" gem "minitest-snapshots", "~> 1.1" diff --git a/gemfiles/legacy.gemfile b/gemfiles/legacy.gemfile new file mode 100644 index 0000000..af2c830 --- /dev/null +++ b/gemfiles/legacy.gemfile @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +source "https://rubygems.org" +gemspec path: ".." + +gem "activesupport", "~> 7.1.3" # Needed for factory_bot 6.3 +gem "factory_bot", "~> 6.3.0" +gem "megatest", "~> 0.11.0" +gem "minitest-snapshots", "~> 1.1" +gem "mocha", "~> 3.0" +gem "observer" +gem "openssl" +gem "rake", "~> 13.0" +gem "vcr", "~> 6.2" +gem "webmock", "~> 3.23"