Tests #1308
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * 0' # weekly | |
jobs: | |
tests: | |
timeout-minutes: 30 | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:13 | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
POSTGRES_PASSWORD: postgres | |
strategy: | |
matrix: | |
speed: | |
- fast | |
- medium | |
- slow | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-pr-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems-pr- | |
- name: Test | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
NODE_OPTIONS: --openssl-legacy-provider | |
OXT_DB_USER: postgres | |
OXT_DB_PASS: postgres | |
RAILS_ENV: test | |
run: | | |
gem install bundler | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
bin/rails assets:precompile | |
bundle exec rake parallel:create parallel:load_schema parallel:seed --trace | |
bundle exec parallel_rspec ./spec --test-options "--tag speed:${{ matrix.speed }}" |