Various 2024 01 21 #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gha-workflow-libyear-bundler-test | |
on: [push, pull_request] | |
jobs: | |
# Linting is a separate job, primary because it only needs to be done once, | |
# and secondarily because jobs are performed concurrently. | |
gha-job-pt-lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/ruby-2.1.rb | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# We only lint against the lowest supported ruby (see CONTRIBUTING.md | |
# for details) | |
ruby-version: '2.1' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Lint | |
run: bundle exec rubocop | |
gha-job-pt-test: | |
name: Ruby ${{ matrix.ruby }} | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
strategy: | |
fail-fast: false | |
# Currently a one-dimensional matrix of ruby versions. In the future we | |
# should add bundler version as a second dimension. | |
matrix: | |
# See lowest supported ruby version in gemspec | |
ruby: | |
- '2.1' | |
- '2.3' | |
- '2.4' | |
- '2.5' | |
- '2.6' | |
- '2.7' | |
- '3.0' | |
- '3.1' | |
- '3.2' | |
- '3.3' | |
include: | |
# Ruby 2.2 does not currently work on ubuntu-latest: | |
# | |
# ``` | |
# /opt/hostedtoolcache/Ruby/2.2.10/x64/bin/gem install bundler -v ~> 1.0 | |
# ERROR: While executing gem ... (RuntimeError) | |
# Marshal.load reentered at marshal_load | |
# Error: The process '/opt/hostedtoolcache/Ruby/2.2.10/x64/bin/gem' failed with exit code 1 | |
# ``` | |
- ruby: '2.2' | |
os: 'ubuntu-20.04' | |
env: | |
# > $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | |
# > https://github.com/ruby/setup-ruby#matrix-of-gemfiles | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/ruby-${{ matrix.ruby }}.rb | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Test | |
run: bundle exec rspec |