#10 Removing makefile
Some checks failed
DRB Build Tests / test_setup (push) Failing after 9s
DRB Build Tests / drb_build_and_test (push) Has been cancelled

The makefile for the client is not as useful as a install script

- Updated test action to install client deps.
- Added new action to specifically test the install script for client
This commit is contained in:
Logan Cusano
2024-04-21 02:13:35 -04:00
parent 59bfdbe143
commit 539dbd9518
3 changed files with 30 additions and 128 deletions

View File

@@ -0,0 +1,82 @@
name: DRB Build Tests
on:
pull_request:
branches:
- master
push:
branches:
- master
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"
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
TEST_CHANNEL_ID: ${{ secrets.TEST_CHANNEL_ID }}
TEST_GUILD_ID: ${{ secrets.TEST_GUILD_ID }}
EXPECTED_CLIENT_ID: ${{ secrets.EXPECTED_CLIENT_ID }}
PDAB_PORT: ${{ vars.PDAB_PORT }}
jobs:
drb_build_and_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 (Server)
working-directory: "./server"
run: rm package-lock.json
- name: Install Node-GYP (Server)
working-directory: "./server"
run: npm install -g node-gyp
- name: Install dependencies (Server)
working-directory: "./server"
run: npm install
- name: Remove package-lock.json (Client)
working-directory: "./client"
run: rm package-lock.json
- name: Install dependencies (Client)
working-directory: "./client"
run: npm install
- run: echo "Node has finished installing dependencies"
- name: Run Server tests
working-directory: "./server"
run: npm test
- name: Run Client tests
working-directory: "./client"
run: npm test
- run: echo "Completed the NPM tests"
- name: Start discord-radio-bot service
working-directory: "./client"
run: systemctl start discord-radio-bot.service