diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3bb75015..1aa7b39df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,13 +10,13 @@ jobs: code-style: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.0 - name: Gems cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/gems key: gems-3.0.0-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }} @@ -47,13 +47,13 @@ jobs: - ruby-head - jruby-9.3 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Gems cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/gems key: gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }} diff --git a/.github/workflows/experimental.yml b/.github/workflows/experimental.yml new file mode 100644 index 000000000..a442b78e0 --- /dev/null +++ b/.github/workflows/experimental.yml @@ -0,0 +1,36 @@ +name: Experimental + +on: + schedule: + - cron: "6 20 * * 6" + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - truffleruby-head + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Gems cache + uses: actions/cache@v3 + with: + path: ~/gems + key: gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }} + restore-keys: | + gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}- + gems-${{ matrix.ruby }}- + - name: Install dependencies + run: | + gem install bundler + bundle config path ~/gems + bundle install --jobs 4 --retry 3 + - name: Run tests + run: bundle exec rake spec diff --git a/spec/prawn_manual_spec.rb b/spec/prawn_manual_spec.rb index 2bc19adce..b41d35a31 100644 --- a/spec/prawn_manual_spec.rb +++ b/spec/prawn_manual_spec.rb @@ -4,12 +4,11 @@ require 'digest/sha2' MANUAL_HASH = - case RUBY_ENGINE - when 'ruby' - '2c0279e0bff2a9120494a52aa46216c1871902b5e66a3537bd4d3cbd66db0096b43b6e1ae0e4e189b561c4db9fa1afacb6c41f260e3aaf942faae2fee352d35b' - when 'jruby' - '51baf6440907e9e38d22f50deafa91572aec1174e621c044ae077cfe3d4361982a505dae5f013dd06f64f38cb9b3a38d5a3f8f0903849591774e298a3c91d39a' - end + { + 'ruby' => '2c0279e0bff2a9120494a52aa46216c1871902b5e66a3537bd4d3cbd66db0096b43b6e1ae0e4e189b561c4db9fa1afacb6c41f260e3aaf942faae2fee352d35b', + 'jruby' => '51baf6440907e9e38d22f50deafa91572aec1174e621c044ae077cfe3d4361982a505dae5f013dd06f64f38cb9b3a38d5a3f8f0903849591774e298a3c91d39a', + 'truffleruby' => '9cab8cd0736f239058ce8dc4b2915fe014e1461d434de456d9fbf140c2b69553f39accbe9acb38b974efd1e7d3e5dfddf77e99e0bdba56f43a8746a0e5fcf37b' + }.freeze RSpec.describe Prawn do describe 'manual' do @@ -27,7 +26,7 @@ hash = Digest::SHA512.hexdigest(s) - expect(hash).to eq MANUAL_HASH + expect(hash).to eq MANUAL_HASH[RUBY_ENGINE] end end end