Merge test actions into one action
Some checks failed
Run Discord Radio Bot v3 Tests / test (push) Failing after 1m17s
Some checks failed
Run Discord Radio Bot v3 Tests / test (push) Failing after 1m17s
This commit is contained in:
55
.gitea/workflows/server_tests.yaml.BAK
Normal file
55
.gitea/workflows/server_tests.yaml.BAK
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Run Socket Server Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
NODE_ENV: development
|
||||
MONGO_INITDB_ROOT_USERNAME: admin
|
||||
MONGO_INITDB_ROOT_PASSWORD: admin
|
||||
MONGO_INITDB_DATABASE: drb
|
||||
SERVER_PORT: 6000
|
||||
MONGO_URL: "mongodb://mongodb:27017/drb"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
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
|
||||
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"
|
||||
Reference in New Issue
Block a user