Skip to content

handle soft deletion for schema records that not present on the snapshot #580

handle soft deletion for schema records that not present on the snapshot

handle soft deletion for schema records that not present on the snapshot #580

name: Continuous Integration
on:
push:
pull_request:
branches:
- '!master'
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
AACT_USERNAME: rails
AACT_PASSWORD: password
DB_HOST: localhost
DB_PORT: 5432
DB_USER: rails
DB_PASS: password
DB_NAME: aact_test
DIGITALOCEAN_ACCESS_KEY_ID: ${{ secrets.DIGITALOCEAN_ACCESS_KEY_ID }}
DIGITALOCEAN_SECRET_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SECRET_ACCESS_KEY }}
DIGITALOCEAN_REGION: us-east-1
DIGITALOCEAN_BUCKET: aact-dev
steps:
- name: Checkout code
uses: actions/checkout@v3
# Add or replace dependency steps here
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
bundler-cache: true
- name: Install PostgreSQL 12 client
run: |
sudo apt-get -yqq install libpq-dev
- name: Bundle Install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
# Add or replace database setup steps here
- name: Load database schema
run: |
bundle exec rake db:create
bundle exec rake db:migrate
PGPASSWORD=password psql -h localhost -U rails -d aact_admin_test < db/admin_structure.sql
PGPASSWORD=password psql -h localhost -U rails -d aact_public_test < db/public_structure.sql
# Add or replace test runners here
- name: Run tests
run: |
bundle exec rspec