.github/workflows/ci.yml
name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Monthly
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby-version: ['2.1', '2.2', '2.3', '2.5', '2.7', '3.0', 'jruby-9.1.17.0']
gemfile: [ cql1, cuke_modeler1, cuke_modeler2, cuke_modeler3,
rake10, rake11, rake12, rake13, thor0, thor1 ]
exclude:
# CukeModeler 3.x requires at least Ruby 2.3
- gemfile: cuke_modeler3
ruby-version: '2.1'
- gemfile: cuke_modeler3
ruby-version: '2.2'
# CukeModeler 1.x and 2.x do not support beyond Ruby 2
- gemfile: cuke_modeler1
ruby-version: '3.0'
- gemfile: cuke_modeler2
ruby-version: '3.0'
# Rake 13.x requires at least Ruby 2.2
- gemfile: rake13
ruby-version: '2.1'
# Just not worth it to get these working and no additional and meaningful proof is provided by these
# combinations, given the other combinations that are being tested.
# Problems building ChildProcess native extensions during gem installation
- os: windows-latest
ruby-version: '2.1'
- os: windows-latest
ruby-version: '2.2'
# Mysterious Bundler/Rubygems related segfaults
- os: windows-latest
ruby-version: '2.3'
# TODO: Figure out if the failures are a bug or just JRuby being JRuby
- os: windows-latest
ruby-version: 'jruby-9.1.17.0'
runs-on: ${{ matrix.os }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: testing/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run test suites
run: bundle exec rake cuke_cataloger:test_everything
- name: Push code coverage to Coveralls (conditional)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: "./reports/coverage/lcov/lcov.info"
parallel: true
flag-name: run-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ matrix.gemfile }}
# The 'lcov.info' file is not generating correctly on earlier versions of Ruby and it's not worth figuring out why
if: matrix.ruby-version != '2.1' && matrix.ruby-version != '2.2' && matrix.ruby-version != '2.3' && matrix.ruby-version != 'jruby-9.1.17.0'
test_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
check_documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run documentation check
run: bundle exec rake cuke_cataloger:check_documentation
lint_code:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run RuboCop
run: bundle exec rake cuke_cataloger:rubocop