clean up missing notifications #1841
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: Rails Tests | |
on: | |
push: | |
branches: | |
- '*' | |
- '**/*' | |
# NOTE: you don't need to build all PRs if you are also building all branches | |
# pull_request: | |
# branches: | |
# - '*' | |
# - '**/*' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
# Docker Hub image that the job executes in | |
container: ruby:3.1.6-alpine3.20 | |
# Service containers to run with job | |
services: | |
postgres: | |
image: postgres:13-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASS: postgres | |
POSTGRES_MULTIPLE_EXTENSIONS: hstore | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis:alpine | |
ports: | |
- 6379:6379 | |
env: | |
DATABASE_WAREHOUSE_DB_TEST: test_hmis_warehouse | |
DATABASE_DB_TEST: boston_cas_test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up dependencies | |
run: | | |
apk add --no-cache \ | |
nodejs yarn npm \ | |
tzdata \ | |
git \ | |
bash \ | |
freetds-dev \ | |
icu icu-dev \ | |
curl libcurl curl-dev \ | |
imagemagick \ | |
libmagic file-dev file \ | |
build-base libxml2-dev libxslt-dev postgresql-dev \ | |
libgcc libstdc++ libx11 glib libxrender libxext libintl ttf-dejavu ttf-droid ttf-freefont ttf-liberation ttf-freefont \ | |
freetype freetype-dev harfbuzz ca-certificates ttf-freefont \ | |
postgresql tmux postgis geos geos-dev xz \ | |
shared-mime-info | |
echo "postgres:5432:*:postgres:postgres" > ~/.pgpass | |
chmod 600 ~/.pgpass | |
yarn install --frozen-lockfile | |
gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true | |
gem install bundler -v '< 2' | |
- name: 'Install gems' | |
run: | | |
bundle install --jobs 4 --retry 3 | |
- name: 'App setup' | |
run: | | |
cp config/secrets.yml.sample config/secrets.yml | |
mkdir app/assets/stylesheets/theme/styles | |
touch app/assets/stylesheets/theme/styles/_variables.scss | |
cp .rspec.travis .rspec | |
- name: Prepare test db | |
env: | |
RAILS_ENV: test | |
DATABASE_ADAPTER: postgresql | |
DATABASE_DB_TEST: boston_cas_test | |
DATABASE_HOST: postgres | |
DATABASE_PASS: postgres | |
DATABASE_USER: postgres | |
PGPASSWORD: postgres | |
DEFAULT_FROM: [email protected] | |
DATABASE_WAREHOUSE_DB_TEST: test_hmis_warehouse | |
HOSTNAME: openpath.host | |
PORT: 80 | |
run: | | |
bundle exec rake db:drop db:create db:schema:load | |
createdb -h $DATABASE_HOST -U $DATABASE_USER $DATABASE_WAREHOUSE_DB_TEST | |
bundle exec rake assets:precompile | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
DATABASE_ADAPTER: postgresql | |
DATABASE_HOST: postgres | |
DATABASE_PASS: postgres | |
DATABASE_USER: postgres | |
DATABASE_DB_TEST: boston_cas_test | |
DEFAULT_FROM: [email protected] | |
DATABASE_WAREHOUSE_DB_TEST: test_hmis_warehouse | |
HOSTNAME: openpath.host | |
FQDN: openpath.host | |
PORT: 80 | |
run: | | |
bundle exec rspec |