Skip to content

set the port to 0 before running tests #5

set the port to 0 before running tests

set the port to 0 before running tests #5

Workflow file for this run

name: My Brand Node.js CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18.x"
- name: Install dependencies
run: npm install
- name: Run Jest tests
run: |
PORT=0 npm test
env:
ADMIN_EMAIL: ${{ secrets.ADMIN_EMAIL }}
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
MONGO_URI: ${{ secrets.MONGO_URI }}
PORT: ${{ secrets.PORT }}