Skip to content

README: Requirements layout improved #25

README: Requirements layout improved

README: Requirements layout improved #25

Workflow file for this run

name: Build
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
test:
name: Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
ruby:
- "2.5"
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"
include:
- ruby: "2.5"
gemfile: "ruby_2_5"
- ruby: "2.6"
gemfile: "ruby_2_6"
- ruby: "2.7"
gemfile: "ruby_2_7"
- ruby: "3.0"
gemfile: "ruby_3_0"
- ruby: "3.1"
gemfile: "ruby_3_1"
- ruby: "3.2"
gemfile: "ruby_3_2"
- ruby: "3.3"
gemfile: "ruby_3_3"
- ruby: "3.4"
gemfile: "ruby_3_4"
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
- name: Install SQLite dependencies for Ruby < 3.0
if: matrix.ruby == '2.7' || matrix.ruby == '2.6' || matrix.ruby == '2.5'
run: |
sudo apt-get update
sudo apt-get install -y libsqlite3-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Bundle
run: bundle exec rake install
# - name: Debug environment
# if: matrix.ruby == '2.7'
# run: |
# ruby -v
# echo "SQLite3 version:"
# sqlite3 --version
# echo "Installed gems:"
# BUNDLE_GEMFILE=/home/runner/work/sanitized/sanitized/ruby_2_7.gemfile bundle list
# echo "Bundle environment:"
# BUNDLE_GEMFILE=/home/runner/work/sanitized/sanitized/ruby_2_7.gemfile bundle env
# echo "Generated gemfiles:"
# ls -la gemfiles/
# echo "Active Record 5.0 gemfile contents:"
# cat gemfiles/active_record_5_0_7_2.gemfile
# echo "Running with Appraisal:"
# bundle exec appraisal bundle list
- name: Run tests
run: |
set -e
bundle exec appraisal rspec
shell: bash