Skip to content

Fix CI build combinations #8

Fix CI build combinations

Fix CI build combinations #8

Workflow file for this run

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: [ cuke_modeler1, cuke_modeler2, cuke_modeler3 ]
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'
# 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'
# Problems building FFI native extensions during gem installation
- os: windows-latest
ruby-version: '2.3'
# Bundle install is broken on Ruby 2.2 for the latest Ubuntu (https://github.com/ruby/setup-ruby/issues/496). Use an older Ubuntu instead (see below).
- os: ubuntu-latest
ruby-version: '2.2'
include:
# A version of Ubuntu without the Bundler error on Ruby 2.2
- os: 'ubuntu-20.04'
ruby-version: '2.2'
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 CI Rake task
run: bundle exec rake cuke_slicer: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_slicer: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_slicer:rubocop