Skip to content

Merge pull request #514 from wri/feature/api-documents-filter-by-cont… #1884

Merge pull request #514 from wri/feature/api-documents-filter-by-cont…

Merge pull request #514 from wri/feature/api-documents-filter-by-cont… #1884

Workflow file for this run

env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
APP_URL: http://localhost:3000
FRONTEND_URL: http://localhost:5000
SENDGRID_API_KEY: asdf
CONTACT_EMAIL: [email protected]
RESPONSIBLE_EMAIL: [email protected]
AUTH_SECRET: secret
RAILS_ENV: test
SECRET_KEY_BASE: f54c9d76c42e397e17cbc0d0a024da5a762a7a0d934839b417a77dac6fda65a49a37b32bcd229ac5fd5c1fedef8ed6acf7a57ed6465d6339862cdc0dfab8886f
name: Tests
on: push
jobs:
e2e-setup:
name: Check E2E Setup
runs-on: ubuntu-22.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@v4
- name: Install dependencies
run: |
sudo apt update --fix-missing
sudo apt-get install libgdal-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup E2E database
run: bin/rails e2e:setup RAILS_ENV=e2e
tests:
name: Tests
runs-on: ubuntu-22.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@v4
- name: Install dependencies
run: |
sudo apt update --fix-missing
sudo apt-get -yqq install gdal-bin libgdal-dev
npm install -g mjml
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup test database
run: bin/rails db:create db:schema:load
- name: Run tests
run: bundle exec rspec spec
- name: Upload Code Coverage
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage/