validate that auth code actually is for the authenticated client on /… #21
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: build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# See https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers#running-jobs-directly-on-the-runner-machine | |
services: | |
postgres: | |
# Docker Hub image | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: S3cret | |
POSTGRES_USER: user | |
POSTGRES_DB: authorization_db | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm ci | |
- name: Setup env | |
run: cp .dev.env .env | |
- name: Run linter and style check | |
run: npm run lint | |
- name: Build for production | |
run: npm run build | |
- name: Run migrations and populate with dummy data | |
run: npm run dev-db | |
- name: Run integration tests | |
run: npm t | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run end-to-end tests | |
run: npm run e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 15 |