-
-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/3.3.0' into main
- Loading branch information
Showing
21 changed files
with
304 additions
and
113 deletions.
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,82 @@ | ||
name: Test & lint | ||
on: [push, pull_request] | ||
|
||
env: | ||
RAILS_ENV: test | ||
PGHOST: localhost | ||
PGUSER: postgres | ||
|
||
jobs: | ||
tests: | ||
name: Test & lint | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ['2.4', '2.5', '2.6', '2.7', 'jruby', 'truffleruby'] | ||
gemfile: ['gemfiles/activerecord_4.2.0.gemfile', 'gemfiles/activerecord_5.0.2.gemfile', 'gemfiles/activerecord_5.1.0.gemfile', 'gemfiles/activerecord_5.2.2.gemfile', 'gemfiles/activerecord_6.0.0.gemfile', 'gemfiles/activerecord_6.1.0.gemfile', 'gemfiles/activerecord_master.gemfile'] | ||
exclude: | ||
- gemfile: 'gemfiles/activerecord_4.2.0.gemfile' | ||
ruby: '2.7' # rails 4.2 can't run on ruby 2.7 due to BigDecimal API change | ||
- gemfile: 'gemfiles/activerecord_4.2.0.gemfile' | ||
ruby: 'truffleruby' # TruffleRuby 21.0 targets Ruby 2.7, same as above | ||
- gemfile: 'gemfiles/activerecord_master.gemfile' | ||
ruby: '2.6' # rails 7+ requires ruby 3.0+ | ||
- gemfile: 'gemfiles/activerecord_master.gemfile' | ||
ruby: '2.5' # rails 7+ requires ruby 3.0+ | ||
- gemfile: 'gemfiles/activerecord_6.0.0.gemfile' | ||
ruby: '2.4' # rails 6+ requires ruby 2.5+ | ||
- gemfile: 'gemfiles/activerecord_6.1.0.gemfile' | ||
ruby: '2.4' # rails 6+ requires ruby 2.5+ | ||
- gemfile: 'gemfiles/activerecord_master.gemfile' | ||
ruby: '2.4' # rails 6+ requires ruby 2.5+ | ||
- gemfile: 'gemfiles/activerecord_5.0.2.gemfile' | ||
ruby: 'jruby' # this *should* work - there's a test failure; it's not incompatible like the other excludes. could be an issue in Rails 5.0.2? | ||
- gemfile: 'gemfiles/activerecord_6.1.0.gemfile' | ||
ruby: 'jruby' # this *should* work. it seems like there's an issue with rails 6 on jruby. | ||
- gemfile: 'gemfiles/activerecord_master.gemfile' | ||
ruby: 'jruby' # this *should* work. it seems like there's an issue with rails 6 on jruby. | ||
|
||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: cancan_postgresql_spec | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: ["5432:5432"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '20' | ||
|
||
# https://github.com/CanCanCommunity/cancancan/pull/669#issuecomment-748019539 | ||
- name: Nokogiri support for Truffleruby | ||
run: sudo apt-get -yqq install libxml2-dev libxslt-dev | ||
if: ${{ matrix.ruby == 'truffleruby' }} | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: Run linter | ||
run: bundle exec rubocop | ||
|
||
- name: Run tests on sqlite | ||
run: DB=sqlite bundle exec rake | ||
|
||
- name: Run tests on postgres | ||
run: DB=postgres bundle exec rake |
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 |
---|---|---|
|
@@ -37,4 +37,5 @@ AllCops: | |
TargetRubyVersion: 2.2.0 | ||
Exclude: | ||
- 'gemfiles/**/*' | ||
- 'vendor/**/*' | ||
- 'Appraisals' |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.