fix/minor fix #131
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: CI for New Pull Requests | |
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
project-directory: ./ | |
jobs: | |
build: | |
name: Run all tests | |
runs-on: ubuntu-latest | |
container: node:10.18-jessie | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgis/postgis | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
rabbitmq: | |
image: rabbitmq | |
env: | |
RABBITMQ_DEFAULT_USER: rabbitmq | |
RABBITMQ_DEFAULT_PASS: rabbitmq | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.x' | |
- name: Install dependencies | |
run: npm ci | |
working-directory: ${{ env.project-directory }} | |
- name: run ESLint | |
run: npm run lint | |
working-directory: ${{ env.project-directory }} | |
- name: run db-migrate | |
run: npm run db-migrate-ci | |
working-directory: ${{ env.project-directory }} | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@postgres/postgres | |
- name: run api-tests | |
run: npm run test | |
working-directory: ${{ env.project-directory }} | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@postgres/postgres | |
DATABASE_URL_LEGACYDB: postgresql://postgres:postgres@postgres/postgres | |
RABBIT_MQ_URL: amqp://rabbitmq:rabbitmq@rabbitmq |