Update rubocop → 1.59.0 (unknown) #190
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: Push & PR | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: [main] | |
jobs: | |
rubocop: | |
name: Rubocop | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true | |
cache-version: mysql-7.0 | |
- name: Rubocop | |
run: bundle exec rubocop | |
rspec: | |
name: RSpec | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
activerecord: ['6.1', '7.0'] | |
ruby: ['2.7', '3.1', '3.2'] | |
exclude: | |
- activerecord: '6.1' | |
ruby: '3.2' | |
- activerecord: '6.1' | |
ruby: '3.1' | |
- activerecord: '7.0' | |
ruby: '2.7' | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: test | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_PASSWORD: dummy | |
POSTGRES_USER: root | |
POSTGRES_DB: test | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready --health-interval 10s | |
--health-timeout 5s --health-retries 5 | |
sql.data: | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
env: | |
ACCEPT_EULA: Y | |
SA_PASSWORD: Password1234 | |
ports: | |
- 1433:1433 | |
env: | |
BUNDLE_WITH: mysql postgres sqlserver | |
MYSQL_URL: mysql2://root@127.0.0.1:3306/test | |
POSTGRES_URL: postgres://root:dummy@127.0.0.1:5432/test | |
RAILS: ${{ matrix.activerecord }} | |
RAILS_ENV: test | |
SQLSERVER_URL: sqlserver://sa:Password1234@127.0.0.1:1433/test | |
steps: | |
- name: Setup FreeTDS | |
run: | | |
sudo apt-get install -y freetds-bin freetds-common freetds-dev libct4 libsybdb5 | |
- name: Wait for SQLServer | |
run: | | |
until echo -e "SELECT @@VERSION\nGO" | tsql -H 127.0.0.1 -p 1433 -U sa -P Password1234; | |
do | |
echo 'Waiting for SqlServer ...' | |
sleep 2 | |
done | |
- name: Create SQLServer Test DB | |
run: echo -e "CREATE DATABASE test\nGO" | tsql -H 127.0.0.1 -p 1433 -U sa -P Password1234 | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
cache-version: ${{ matrix.activerecord }} | |
- name: RSpec | |
timeout-minutes: 2 | |
run: bundle exec rspec |