Updating tests
Some checks failed
Run Socket Server Tests / test (push) Failing after 26s

This commit is contained in:
Logan Cusano
2024-04-07 16:53:54 -04:00
parent 0a76804490
commit 8e73659855

View File

@@ -2,53 +2,55 @@ name: Run Socket Server Tests
on: [push, pull_request]
env:
NODE_ENV: development
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
SERVER_PORT: 6000
MONGO_URL: "mongodb://127.0.0.1:27017/drb"
env:
NODE_ENV: development
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: drb
SERVER_PORT: 6000
MONGO_URL: "mongodb://127.0.0.1:27017/drb"
jobs:
build:
test:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo
image: mongo:latest
ports:
- 27017:27017
options: --name mongodb
test:
runs-on: ubuntu-latest
options: >-
--health-cmd mongo
--health-interval 10s
--health-timeout 5s
--health-retries 5
--name mongodb
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Remove package-lock.json
working-directory: './server'
run: rm package-lock.json
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node-GYP
working-directory: './server'
run: npm install -g node-gyp
- name: Install dependencies
working-directory: './server'
run: npm install
- run: echo "Node has finished installing dependencies"
- name: Run tests
working-directory: './server'
run: npm test
- run: echo "Completed the tests"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Remove package-lock.json
working-directory: "./server"
run: rm package-lock.json
- name: Install Node-GYP
working-directory: "./server"
run: npm install -g node-gyp
- name: Install dependencies
working-directory: "./server"
run: npm install
- run: echo "Node has finished installing dependencies"
- name: Run tests
working-directory: "./server"
run: npm test
- run: echo "Completed the tests"