-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compatibility for ruby 3.2 and add tests
- Loading branch information
Showing
2 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: RSpec and Cucumber | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', jruby ] | ||
gemfile: [ gemfiles/rails-6-1.gemfile ] | ||
experimental: [ false ] | ||
include: | ||
- ruby: '3.0' | ||
gemfile: gemfiles/rails-6-0.gemfile | ||
experimental: false | ||
- ruby: '3.0' | ||
gemfile: gemfiles/rails-7-0.gemfile | ||
experimental: false | ||
- ruby: '3.2' | ||
gemfile: gemfiles/rails-7-0.gemfile | ||
experimental: false | ||
- ruby: '3.2' | ||
gemfile: gemfiles/rails-main.gemfile | ||
experimental: true | ||
- ruby: ruby-head | ||
gemfile: gemfiles/rails-7-0.gemfile | ||
experimental: false | ||
- ruby: jruby-head | ||
gemfile: gemfiles/rails-6-1.gemfile | ||
experimental: true | ||
runs-on: ubuntu-20.04 | ||
continue-on-error: ${{ matrix.experimental }} | ||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
JRUBY_OPTS: --debug | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup ImageMagick policy | ||
run: sudo sh -c 'echo '\''<policymap><policy domain="coder" rights="read|write" pattern="PDF" /></policymap>'\'' > /etc/ImageMagick-6/policy.xml' | ||
- name: Update package list | ||
run: sudo apt update | ||
- name: Install ghostscript to process PDF | ||
run: sudo apt-get -y install ghostscript | ||
- name: Install libvips-dev for Carrierwave::Vips | ||
run: sudo apt-get install libvips-dev | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run RSpec | ||
run: bundle exec rake spec | ||
- name: Run Cucumber | ||
run: bundle exec rake features | ||
|
||
rubocop: | ||
name: RuboCop | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2" | ||
bundler-cache: true | ||
- name: Run check | ||
run: bundle exec rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters