CI: Add Ruby 3.3 to the test matrix #71
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: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: 'Test (Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.rails }}, DB: ${{ matrix.db }})' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: ['3.3', '3.2', '3.1', '3.0'] | |
rails: ['7.1', '7.0', '6.1'] | |
db: [mysql, postgres, sqlite] | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/spec/support/gemfiles/Gemfile.rails-${{ matrix.rails }}.x | |
DB: ${{ matrix.db }} | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_DATABASE: double_entry_test | |
MYSQL_USER: mysql | |
MYSQL_PASSWORD: password | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: double_entry_test | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: cp spec/support/database.ci.yml spec/support/database.yml | |
- run: bundle exec rspec | |
- run: ruby script/jack_hammer -t 2000 |