Skip to content

Bump version to 7.0.0 and release #42

Bump version to 7.0.0 and release

Bump version to 7.0.0 and release #42

Workflow file for this run

# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: build
on:
push:
branches: [main]
pull_request:
branches: "*"
jobs:
style:
name: Styles (Standard)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true
- run: bundle exec standardrb --format github
test-mysql:
name: Tests (MySQL)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: [2.7, jruby-9.4, head, jruby-head]
continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }}
services:
mysql:
image: mysql:5.7
ports:
- 3306
env:
JRUBY_OPTS: "-J-Xms64M -J-Xmx1024M"
MYSQL_USER: root
MYSQL_PASSWORD: root
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup database
run: |
sudo service mysql start
- name: Run tests
run: |
bundle exec rake test:mysql2
test-pgsql:
name: Tests (Postgres)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: [2.7, jruby-9.4, head, jruby-head]
continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }}
services:
postgres:
image: postgres:11
env:
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
JRUBY_OPTS: "-J-Xms64M -J-Xmx1024M"
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup database
env:
PGPASSWORD: postgres
run: |
createdb spectacles_test
- name: Run tests
run: |
bundle exec rake test:postgresql
test-sqlite:
name: Tests (SQLite)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: [2.7, jruby-9.4, head, jruby-head]
continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }}
env:
JRUBY_OPTS: "-J-Xms64M -J-Xmx1024M"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: |
bundle exec rake test:sqlite3