play with postgres service variables #2720
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 | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Run linting for all packages | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install node v16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: bahmutov/npm-install@v1 | |
- run: yarn lint | |
run-api-v2-tests: | |
runs-on: ubuntu-latest | |
name: API V2 Tests | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- run: yarn install --immutable | |
- name: Run Jest Tests | |
run: yarn packages/api-v2 test | |
run-api-e2e-tests: | |
runs-on: ubuntu-latest | |
name: Backend E2E Tests | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_USER: test | |
POSTGRES_PASSWORD: test | |
POSTGRES_DB: test | |
ports: | |
- "5432:5432" | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- run: yarn install --immutable | |
- name: Run E2E tests | |
run: yarn test:e2e | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: 5432 | |
build-frontend-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- run: yarn install --immutable | |
- name: Build Docker image for frontend | |
run: yarn frontend:docker:build | |
build-backend-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- run: yarn install --immutable | |
- name: Build Docker image for backend | |
run: yarn backend:docker:build |