Skip to content

CI

CI #46

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'
# Random JRuby bugs
- os: ubuntu-latest
ruby-version: 'jruby-9.1.17.0'
- 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 CI Rake task
run: bundle exec rake cuke_linter: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 }}
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
- run: bundle exec rake cuke_linter: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
- run: bundle exec rake cuke_linter:rubocop