Added persisted check for AR timestamped_migrations (#147) #459
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: Rspec | |
on: push | |
jobs: | |
verify: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
database: | |
- postgresql | |
- mysql | |
rails: | |
- '~> 5.2' | |
- '>= 6.0' | |
include: | |
- rails: '~> 5.2' | |
ruby: 2.7.0 | |
- rails: '>= 6.0' | |
ruby: 3.0.0 | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: motor_admin_test | |
ports: ["5432:5432"] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_USER: postgres | |
MYSQL_DATABASE: motor_admin_test | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
ports: ["3306:3306"] | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.13.1 | |
- name: Cache node_modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | |
- name: Cache gems | |
uses: actions/cache@v1 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gem- | |
- name: Install dependencies | |
env: | |
RAILS_ENV: test | |
RAILS_VERSION: ${{ matrix.rails }} | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install chromium-browser freetds-dev | |
gem install bundler | |
bundle config path vendor/bundle | |
bundle update --jobs 4 --retry 3 | |
yarn install | |
- name: Run | |
env: | |
RAILS_ENV: test | |
RAILS_VERSION: ${{ matrix.rails }} | |
DATABASE_TYPE: ${{ matrix.database }} | |
COVERAGE: true | |
run: | | |
bundle exec rake db:setup | |
bundle exec rake app:motor:load | |
bundle exec yarn build:test | |
bundle exec rspec |