Merge pull request #447 from wri/feature/upgrades-to-reset-passwords #1116
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
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
APP_URL: http:https://localhost:3000 | |
name: Tests | |
on: push | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgis/postgis:12-3.1-alpine | |
env: | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
ports: ["5432:5432"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt update --fix-missing | |
sudo apt-get -yqq install libpq-dev build-essential libcurl4-openssl-dev gdal-bin | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup test database | |
env: | |
RAILS_ENV: test | |
POSTGRES_PORT_5432_TCP_ADDR: localhost | |
POSTGRES_PORT_5432_TCP_PORT: 5432 | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
run: | | |
bin/rails db:create db:schema:load | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
POSTGRES_PORT_5432_TCP_ADDR: localhost | |
POSTGRES_PORT_5432_TCP_PORT: 5432 | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
FRONTEND_URL: http:https://localhost:5000 | |
SENDGRID_API_KEY: asdf | |
CONTACT_EMAIL: [email protected] | |
RESPONSIBLE_EMAIL: [email protected] | |
AUTH_SECRET: secret | |
ADMIN_PASSWORD: password | |
run: bundle exec rspec spec | |
- name: Upload Code Coverage | |
uses: actions/upload-artifact@v2 | |
with: | |
name: code-coverage | |
path: coverage/ |