Skip to content

add gemfiles

add gemfiles #14

Workflow file for this run

name: Test Suite
on: [push]
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
orm: [active_record, mongoid]
rails: ["5.2", "6.0", "6.1", "7.0", "7.1", "7.2"]
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", head]
exclude:
- rails: 5.2
ruby: 3.0
- rails: 5.2
ruby: 3.1
- rails: 5.2
ruby: 3.2
- rails: 5.2
ruby: 3.3
- rails: 5.2
ruby: head
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v3
with:
path: |
**/bundle
key:
bundle-use-ruby-${{ matrix.ruby }}-rails-${{ matrix.rails }}-orm-${{
matrix.orm }}-gemfile-${{
hashFiles(format('**/gemfiles/rails_{0}.gemfile', matrix.rails))
}}-gemspec-${{ hashFiles('**/devise-security.gemspec') }}
- name: bundle install
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
run: |
bundle config path vendor/bundle
bundle install
- name: Start MongoDB
uses: superchargejs/mongodb-github-action@1.9.0
if: ${{ matrix.orm == 'mongoid' }}
- name:
Tests for ORM ${{ matrix.orm }}, Rails ${{ matrix.rails }}, and Ruby
${{ matrix.ruby }}
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
CI: true
DEVISE_ORM: ${{ matrix.orm }}
run: |
bundle exec rake
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name:
run-orm-${{ matrix.orm }}-rails-${{ matrix.rails }}-ruby-${{
matrix.ruby }}
parallel: true
path-to-lcov: ./coverage/lcov/devise-security.lcov
finish:
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
file: ./coverage/lcov/devise-security.lcov