CI #266
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: | |
schedule: | |
- cron: '0 13 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- '3.1' | |
- '3.2' | |
- '3.3' | |
- '3' | |
activerecord-version: | |
- '6_1' | |
- '7_0' | |
- '7_1' | |
- '7_2' | |
- '8_0' | |
- 'latest' | |
mysql-version: | |
- '8.0' | |
exclude: | |
# Exclude conditions that don't meat the minimal requirement | |
- ruby-version: '3.1' | |
activerecord-version: '8_0' | |
# Exclude duplicate conditions | |
- ruby-version: '3.1' | |
activerecord-version: 'latest' # equivalent to '7_2' | |
services: | |
mysql: | |
image: mysql:${{ matrix.mysql-version }} | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd "mysqladmin ping -h localhost" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test | |
env: | |
BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.activerecord-version }}.gemfile | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Show activerecord version | |
run: bundle info activerecord | |
- name: Run tests | |
run: | | |
bundle exec rake | |
env: | |
MYSQL_HOST: 127.0.0.1 | |
MYSQL_USERNAME: root | |
MYSQL_PASSWORD: password | |
MYSQL_DATABASE: test |