Compare commits
3 Commits
3b8e70208a
...
fd261ef015
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd261ef015 | ||
|
|
91201c3527 | ||
|
|
dfb4c6afa1 |
29
.gitea/workflows/DRBv3_server_build.yaml
Normal file
29
.gitea/workflows/DRBv3_server_build.yaml
Normal 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
|
||||
@@ -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:
|
||||
|
||||
@@ -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} \
|
||||
|
||||
Reference in New Issue
Block a user