Skip to content

fixed errors in the tests #78

fixed errors in the tests

fixed errors in the tests #78

Workflow file for this run

# See postman/README.md
name: Postman tests
on:
push:
branches: [main, dev/postman-tests, dev/api]
jobs:
run-and-test:
runs-on: ubuntu-latest
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
# Start up a postgres database
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name:
uses: actions/checkout@v2
# run the migration and seeding scripts for prisma
- name: Set up Prisma
run: |
cd next
npm i
npx prisma migrate dev
npx prisma generate
npx prisma db seed
# run the API in the background. This will host it on localhost:3000
- name: Start API
run: |
cd next
npm run dev &
# Run the tests through postman
- name: Run API Tests
id: run-newman
uses: anthonyvscode/newman-action@v1
with:
collection: postman/WebsiteTheSSEquelTests.postman_collection.json
environment: postman/WebsiteTheSSEquelTests.postman_collection.json
reporters: cli
- name: Output summary to console
run: echo ${{ steps.run-newman.outputs.summary }}