Fix spec assertion #135
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: CI | |
on: [push] | |
jobs: | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.0 | |
bundler: 2.4 | |
bundler-cache: true | |
- name: Install gems | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Run linters | |
run: bin/rubocop --parallel | |
- name: Run code metric tools | |
run: bundle exec rails_best_practices | |
- name: Run brakeman metric tools | |
run: bundle exec brakeman | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.0 | |
bundler: 2.4 | |
bundler-cache: true | |
- name: Install library for postgres | |
run: sudo apt-get install libpq-dev | |
- name: Setup Database | |
run: | | |
bundle exec rails db:setup | |
env: | |
POSTGRES_USERNAME: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_PORT: 5432 | |
UPLOADCARE_PUBLIC_KEY: demopublickey | |
UPLOADCARE_SECRET_KEY: demoprivatekey | |
RAILS_ENV: test | |
- name: Install gems | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Run tests | |
run: | | |
bundle exec rspec | |
env: | |
POSTGRES_USERNAME: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_PORT: 5432 | |
UPLOADCARE_PUBLIC_KEY: demopublickey | |
UPLOADCARE_SECRET_KEY: demoprivatekey | |
RAILS_ENV: test | |
NODE_OPTIONS: "--openssl-legacy-provider" |