Skip to content

Update README.md

Update README.md #11

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: inventory-control_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Install dependencies
env:
RAILS_ENV: test
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
yarn install --check-files
- name: Setup test database
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/inventory-control_test
run: |
bin/rails db:create
bin/rails db:schema:load
- name: Run migrations
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/inventory-control_test
run: |
bin/rails db:migrate
- name: Run tests
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/inventory-control_test
run: bundle exec rspec