Skip to content

CI

CI #155

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Monthly
jobs:
test_ubuntu:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby-version: [ '2.3', '2.5', '2.7', '3.0',
'jruby-9.1.17.0', 'jruby-9.3.4.0']
gemfile: [ gherkin9, gherkin10, gherkin11, gherkin12, gherkin13, gherkin14,
gherkin15, gherkin16, gherkin17, gherkin18, gherkin19, gherkin20,
gherkin21, gherkin22, gherkin23, gherkin24, gherkin25, gherkin26,
gherkin27, gherkin28 ]
exclude:
# Requires at least Ruby 2.5
- ruby-version: 2.3
gemfile: gherkin27
- ruby-version: jruby-9.1.17.0
gemfile: gherkin27
- ruby-version: 2.3
gemfile: gherkin28
- ruby-version: jruby-9.1.17.0
gemfile: gherkin28
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
JRUBY_OPTS: '-J-Djdk.io.File.enableADS=true' # Because of a JDK bug that might get fixed at some point
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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_modeler: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 }}
if: matrix.ruby-version != '2.3' && matrix.ruby-version != 'jruby-9.1.17.0'
test_macos:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
ruby-version: [ '2.3', '2.5', '2.7', '3.0',
'jruby-9.1.17.0', 'jruby-9.3.4.0']
gemfile: [ gherkin9, gherkin10, gherkin11, gherkin12, gherkin13, gherkin14,
gherkin15, gherkin16, gherkin17, gherkin18, gherkin19, gherkin20,
gherkin21, gherkin22, gherkin23, gherkin24, gherkin25, gherkin26,
gherkin27, gherkin28 ]
exclude:
# Requires at least Ruby 2.5
- ruby-version: 2.3
gemfile: gherkin27
- ruby-version: jruby-9.1.17.0
gemfile: gherkin27
- ruby-version: 2.3
gemfile: gherkin28
- ruby-version: jruby-9.1.17.0
gemfile: gherkin28
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
JRUBY_OPTS: '-J-Djdk.io.File.enableADS=true' # Because of a JDK bug that might get fixed at some point
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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_modeler: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 }}
if: matrix.ruby-version != '2.3' && matrix.ruby-version != 'jruby-9.1.17.0'
test_windows:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
ruby-version: [ '2.3', '2.5', '2.7', '3.0',
'jruby-9.1.17.0', 'jruby-9.3.4.0']
gemfile: [ gherkin9, gherkin10, gherkin11, gherkin12, gherkin13, gherkin14,
gherkin15, gherkin16, gherkin17, gherkin18, gherkin19, gherkin20,
gherkin21, gherkin22, gherkin23, gherkin24, gherkin25, gherkin26,
gherkin27, gherkin28 ]
exclude:
# Requires at least Ruby 2.5
- ruby-version: 2.3
gemfile: gherkin27
- ruby-version: jruby-9.1.17.0
gemfile: gherkin27
- ruby-version: 2.3
gemfile: gherkin28
- ruby-version: jruby-9.1.17.0
gemfile: gherkin28
# 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 FFI native extensions during gem installation
- os: windows-latest
ruby-version: '2.3'
# Hits some kind of Java bug
- os: windows-latest
ruby-version: jruby-9.3.4.0
gemfile: gherkin23
- os: windows-latest
ruby-version: jruby-9.3.4.0
gemfile: gherkin22
- os: windows-latest
ruby-version: jruby-9.3.4.0
gemfile: gherkin20
- os: windows-latest
ruby-version: jruby-9.3.4.0
gemfile: gherkin18
- os: windows-latest
ruby-version: jruby-9.3.4.0
gemfile: gherkin15
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
JRUBY_OPTS: '-J-Djdk.io.File.enableADS=true' # Because of a JDK bug that might get fixed at some point
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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_modeler: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 }}
if: matrix.ruby-version != '2.3' && matrix.ruby-version != 'jruby-9.1.17.0'
test_finish:
needs: [ test_macos, test_ubuntu, test_windows ]
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@v4
- 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_modeler:check_documentation
lint_code:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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_modeler:rubocop