Compare commits

...

3 Commits

Author SHA1 Message Date
Logan Cusano
fd261ef015 Missed addition
Some checks failed
DRB Server Build / drb_mocha_tests (push) Failing after 7s
DRB Tests / drb_mocha_tests (push) Failing after 55s
- Server build action
2024-04-29 01:13:00 -04:00
Logan Cusano
91201c3527 Update tests
- Update test names
- Added new action to build the latest server code on the server it's running on
- Removed unnecessary vars from makefile
2024-04-29 01:12:30 -04:00
Logan Cusano
dfb4c6afa1 Remove build from tests 2024-04-28 22:52:39 -04:00
3 changed files with 31 additions and 31 deletions

View File

@@ -0,0 +1,29 @@
name: DRB Server Build
on:
push:
branches:
- master
env:
NODE_ENV: production
SERVER_PORT: 3000
MONGO_URL: ${{ secrets.MONGO_URL }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
jobs:
drb_mocha_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build the latest code
working-directory: './server'
run: make build

View File

@@ -1,4 +1,4 @@
name: DRB Build Tests
name: DRB Tests
on:
pull_request:
@@ -25,33 +25,7 @@ env:
PDAB_PORT: ${{ vars.PDAB_PORT }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start Docker
run: systemctl start docker
- name: Build Docker image
working-directory: './server'
run: make build && make run
- name: Wait for server to start
run: sleep 10
- name: Check open docker containers
run: docker ps
- name: Test server accessibility
run: curl -v http://localhost:3000
- name: Stop Docker container
run: docker stop drb
drb_build_and_test:
drb_mocha_tests:
runs-on: ubuntu-latest
services:

View File

@@ -17,9 +17,6 @@ build:
run:
@echo "Running Docker container..."
docker run -d -e NODE_ENV=${NODE_ENV} \
-e MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME} \
-e MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD} \
-e MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE} \
-e SERVER_PORT=${SERVER_PORT} \
-e MONGO_URL=${MONGO_URL} \
-e DISCORD_TOKEN=${DISCORD_TOKEN} \