Files
drb-server/.gitea/workflows/DRBv3_tests.yaml
Logan Cusano 0bc97509a5
All checks were successful
DRB Tests / drb_mocha_tests (push) Successful in 28s
Updated branch name in action
2024-05-16 22:08:23 -04:00

58 lines
1.2 KiB
YAML

name: DRB Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
NODE_ENV: development
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: drb
SERVER_PORT: 3000
MONGO_URL: "mongodb://mongodb:27017/drb"
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
jobs:
drb_mocha_tests:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: >-
--health-cmd mongo
--health-interval 10s
--health-timeout 5s
--health-retries 5
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
run: rm package-lock.json
- name: Install Node-GYP
run: npm install -g node-gyp
- name: Install dependencies
run: npm install
- run: echo "Node has finished installing dependencies"
- name: Run Server tests
run: npm test
- run: echo "Completed the DRB tests"