Assassin Interaction with Other Roles Imporovments (#1766) #370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
static: | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis | |
# Set health checks to wait until redis has started | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps port 6379 on service container to the host | |
- 6379:6379 | |
mongodb: | |
image: mongo:4.4.6 | |
env: | |
MONGO_INITDB_ROOT_USERNAME: admin | |
MONGO_INITDB_ROOT_PASSWORD: password | |
MONGO_INITDB_DATABASE: ultimafia | |
ports: | |
- 27017:27017 | |
options: >- | |
--health-cmd mongo | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "14.15.1" | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install Packages | |
run: npm install | |
- name: Unit Test | |
run: npm run test | |
env: | |
NODE_ENV: development | |
PORT: 3000 | |
UPLOAD_PATH: uploads | |
BASE_URL: http://localhost:3001 | |
GAME_PORTS: "[3010]" | |
CHAT_PORT: 2999 | |
SOCKET_PING_INTERVAL: 10000 | |
SERVER_SOCKET_PING_INTERVAL: 2000 | |
GAME_CREATION_TIMEOUT: 5000 | |
SESSION_SECRET: x | |
LOAD_BALANCER_KEY: x | |
BOT_KEY: x | |
MONGO_URL: localhost | |
MONGO_DB: ultimafia | |
MONGO_USER: admin | |
MONGO_PW: password | |
REDIS_DB: 0 | |
FIREBASE_API_KEY: x | |
FIREBASE_AUTH_DOMAIN: x | |
FIREBASE_PROJECT_ID: x | |
FIREBASE_STORAGE_BUCKET: x | |
FIREBASE_MESSAGING_SENDER_ID: 1 | |
FIREBASE_APP_ID: x | |
FIREBASE_MEASUREMENT_ID: x | |
FIREBASE_JSON_FILE: firebase.json | |
EMAIL_DOMAINS: '["gmail.com"]' | |
AGORA_ID: x | |
AGORA_CERT: x | |
IP_API_URL: https://ipqualityscore.com/api/json/ip | |
IP_API_KEY: x | |
IP_API_PARAMS: strictness=0&allow_public_access_points=true&fast=true&lighter_penalties=true&mobile=true | |
RECAPTCHA_KEY: x | |
RESERVED_NAMES: x | |
REPORT_DISCORD_WEBHOOK: '[{"boards": ["boardShortId"], "hook": "discordWebhookUrl"}]' | |
#optional - dev use only | |
DEV_USERNAME: x | |
DISCORD_ERROR_HOOK: '{"hook": "a"}' |