🧹 Drop department users #355
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: Testing with RSpec | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
NODE_ENV: test | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: cvd | |
POSTGRES_DB: cvd_test | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Install dependencies | |
run: | | |
yarn install --frozen-lockfile | |
bundle install --jobs 4 --retry 3 --path vendor/bundle | |
- name: Set up database | |
env: | |
DATABASE_URL_TEST: postgresql://cvd:postgres@localhost/cvd_test | |
run: bundle exec rails db:schema:load | |
- name: Compile assets | |
run: | | |
bundle exec rails tmp:clear | |
bundle exec rails assets:precompile | |
- name: RSpec | |
run: bundle exec rspec --fail-fast --format documentation | |
env: | |
DATABASE_URL_TEST: postgresql://cvd:postgres@localhost/cvd_test | |
SMTP_URL: smtp://hello%40localhost@localhost | |
LOCKBOX_MASTER_KEY: 0000000000000000000000000000000000000000000000000000000000000000 | |
DEFAULT_FROM: hello@localhost | |
DEFAULT_HOST: http://localhost:3000 | |
FRANCE_CONNECT_HOST: not.a.real.host.test-franceconnect.fr | |
SECURE_CONTENT: true | |
- name: Upload Capybara screenshots | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: capybara-artifacts | |
path: /home/runner/work/**/tmp/capybara/*.png | |
retention-days: 5 |