Skip to content

Release v2.5.2 (#481) #494

Release v2.5.2 (#481)

Release v2.5.2 (#481) #494

Workflow file for this run

name: Run tests
on: push
permissions:
contents: read
jobs:
# Label of the runner job
test-job:
env:
PASSWEAVERAPI_PRISMA_URL: postgresql://postgres:postgres@localhost:5432/passweaver
PASSWEAVER_AUTO_TEST: 1
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
postgres:
# Docker Hub image
image: postgres
# 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
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 6379 on service container to the host
- 6379:6379
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Node dependencies
run: npm ci
- name: Generate Prisma code
run: npx prisma generate
- name: Create database
run: npx prisma db push
- name: Seed development data into database
run: npx prisma db seed -- --environment development
- name: Create temporary key
run: echo "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=" > ${RUNNER_TEMP}/key.txt
- name: Run PassweaverAPI
run: npm start &
- name: Run tests
run: npm test