Skip to content

NODE-TESTS

NODE-TESTS #500

Workflow file for this run

name: NODE-TESTS
on:
push:
branches-ignore:
- 'dependabot/**'
workflow_run:
workflows: ["Dependabot PR Check"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
env:
PGURI: postgresql://postgres:tehsecure@localhost:5432/postgres
PGUSER: postgres
PGPASSWORD: tehsecure
PGSCHEMA: usher
steps:
- run: sudo ethtool -K eth0 tx off rx off
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: |
database/package-lock.json
server/package-lock.json
mockidentityprovider/package-lock.json
- name: build docker compose stack
run: docker compose -f docker-compose-ci.yml up -d
- name: Check running containers
run: docker ps
- name: database npm ci
run: npm ci
working-directory: ./database/
- name: prepare database test data
run: |
npm run db-drop-create-schema
npm run migrate:latest
npm run seed:run
npm run db-reset-test-data
working-directory: ./database/
- name: run database layer tests
run: npm test
working-directory: ./database/
- name: server npm ci
run: npm ci
working-directory: ./server/
- name: start the usher server
run: npm start &
working-directory: ./server/
env:
SKIP_KEYS_CHECK: false
TOKEN_LIFETIME_SECONDS: 3600
SESSION_LIFETIME_SECONDS: 43200
ISSUER_WHITELIST: https://dmgt-test.auth0.com/,test1.net,foo,https://auth.labs.dmgt.com/,http://branded-idp-alias.dmgt.com.mock.localhost:3002/,http://idp.dmgt.com.mock.localhost:3002/,http://whitelisted-but-not-aliased.labs.dmgt.com.mock.localhost:3002/
ISSUER_ALIASES: '{"https://auth.labs.dmgt.com/": "https://dmgt-test.auth0.com/", "http://branded-idp-alias.dmgt.com.mock.localhost:3002/": "http://idp.dmgt.com.mock.localhost:3002/"}'
THEUSHER_AUD_CLAIMS: https://us-central1-dmgt-oocto.cloudfunctions.net/the-usher,http://localhost:3001
- name: run server tests
run: npm test
working-directory: ./server/