Skip to content

fix: ensures opportunity_status is up to date #3360

fix: ensures opportunity_status is up to date

fix: ensures opportunity_status is up to date #3360

Workflow file for this run

name: Continuous Integration
on:
pull_request: {}
push:
branches:
- main
paths-ignore:
- "docs/**"
jobs:
test-e2e-integration:
name: "Cypress Integration Tests"
runs-on: ubuntu-latest
services:
postgres:
image: "postgres:13"
env:
POSTGRES_DB: usdr_grants_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16.14.0
cache: yarn
- name: Install dependencies
run: yarn setup
- name: Run migrations
env:
POSTGRES_TEST_URL: "postgresql://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/usdr_grants_test"
# This is intentional to set POSTGRES_URL=POSTGRES_TEST_URL; ARPA Reporter test runner gates
# dev vs. CI differences based on whether these are the same.
POSTGRES_URL: "postgresql://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/usdr_grants_test"
run: yarn db:migrate
- name: Start Applications
env:
POSTGRES_TEST_URL: "postgresql://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/usdr_grants_test"
# This is intentional to set POSTGRES_URL=POSTGRES_TEST_URL; ARPA Reporter test runner gates
# dev vs. CI differences based on whether these are the same.
POSTGRES_URL: "postgresql://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/usdr_grants_test"
AWS_ACCESS_KEY_ID: "Fake AWS Key"
AWS_SECRET_ACCESS_KEY: "Fake AWS Secret"
NOTIFICATIONS_EMAIL: [email protected]
DATA_DIR: './data'
run: yarn serve &
- name: Run e2e tests
uses: cypress-io/github-action@v5
env:
CYPRESS_BASE_URL: 'http://localhost:8080'
with:
publish-summary: true
working-directory: packages/e2e
test-server-client:
name: "Server and Client Unit Tests"
runs-on: ubuntu-latest
services:
postgres:
image: "postgres:13"
env:
POSTGRES_DB: usdr_grants_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16.14.0
cache: yarn
- name: Install dependencies
run: yarn setup
- name: Run Linter
run: yarn lint
- name: Run unit tests
env:
POSTGRES_TEST_URL: "postgresql://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/usdr_grants_test"
# This is intentional to set POSTGRES_URL=POSTGRES_TEST_URL; ARPA Reporter test runner gates
# dev vs. CI differences based on whether these are the same.
POSTGRES_URL: "postgresql://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/usdr_grants_test"
AWS_ACCESS_KEY_ID: "Fake AWS Key"
AWS_SECRET_ACCESS_KEY: "Fake AWS Secret"
NOTIFICATIONS_EMAIL: [email protected]
run: |
# The .env file needs to be present; the example file is good enough.
cp packages/server/.env.example packages/server/.env
cp packages/client/.env.example packages/client/.env
cp packages/e2e/.env.example packages/e2e/.env
export CI=true; yarn coverage
- name: Publish coverage report to CodeClimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: c0ab87c312e9ca57ec34d55ebec07ed396f96f039b3c725221918a75be71a0eb
with:
coverageLocations: |
${{github.workspace}}/coverage/lcov.info:lcov