Skip to content

Merge pull request #385 from panorama-ed/v1.12.0 #1293

Merge pull request #385 from panorama-ed/v1.12.0

Merge pull request #385 from panorama-ed/v1.12.0 #1293

Workflow file for this run

name: Main
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
ci:
name: CI
strategy:
fail-fast: false
matrix:
# Note that due to https://github.com/actions/runner/issues/849, we'll
# have to use quotes for '4.0' when Ruby 4+ is released -- without
# quotes, CI sees '4' and runs the latest 4.x.
ruby: [3.1, 3.2, 3.3, 3.4, jruby, truffleruby-head]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Conditionally configure bundler via environment variables as advised
# * https://github.com/ruby/setup-ruby#bundle-config
- name: Set bundler environment variables
run: |
echo "BUNDLE_WITH=checks:docs" >> $GITHUB_ENV
if: matrix.ruby == 3.4
- name: Set bundler environment variables
run: |
echo "BUNDLE_WITH=dokaz" >> $GITHUB_ENV
if: matrix.ruby == 3.2
# Use 'bundler-cache: true' instead of actions/cache as advised:
# * https://github.com/actions/cache/blob/main/examples.md#ruby---bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
- uses: codecov/codecov-action@v5
with:
files: ./coverage/coverage.xml
fail_ci_if_error: true # optional (default = false)
# NOTE: If you change this secret, you must change it under the repo
# secrets settings for both GitHub Actions *and* Dependabot secrets. For
# more context, see: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)
if: matrix.ruby == 3.4
- run: bundle exec rubocop
if: matrix.ruby == 3.4
- run: bundle exec yard doctest
if: matrix.ruby == 3.4
- run: bundle exec dokaz
if: matrix.ruby == 3.2 # Does not yet work on Ruby 3.3+: https://github.com/zverok/dokaz/issues/3
- name: Run benchmarks
run: |
BUNDLE_GEMFILE=benchmarks/Gemfile bundle install --jobs 4 --retry 3
BUNDLE_GEMFILE=benchmarks/Gemfile bundle exec ruby benchmarks/benchmarks.rb
if: matrix.ruby == '3.4'