BSP-68 fix broken open/close all #368
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: Run tests | |
on: [push] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13.7-alpine | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: tell-us-who-you-employ | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: tell-us-who-you-employ_test | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Install required Node.js version | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20.9.0 | |
- name: Install dependent libraries | |
run: sudo apt-get install libpq-dev | |
- name: Yarn install | |
run: yarn --frozen-lockfile | |
- name: Setup database | |
env: | |
RAILS_ENV: test | |
run: | | |
bundle exec rails db:drop | |
bundle exec rails db:create | |
bundle exec rails db:migrate | |
- name: Compile assets | |
env: | |
RAILS_ENV: test | |
run: bundle exec rails assets:precompile | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
run: bundle exec rspec | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v2 |