Skip to content

Commit

Permalink
Merge pull request #202 from boostcampwm-2024/dev-be
Browse files Browse the repository at this point in the history
[BE] 3์ฃผ์ฐจ ๋ฐฐํฌ
  • Loading branch information
songbuild00 authored Nov 14, 2024
2 parents e0d587f + 5ab1583 commit 221239a
Show file tree
Hide file tree
Showing 59 changed files with 4,080 additions and 535 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,36 @@ on:
push:
branches: [ "release" ]

env:
NODE_ENV: test
DB_HOST_TEST: localhost
DB_PORT_TEST: 3306
DB_PASSWD_TEST: test
DB_NAME_TEST: test_db

jobs:
deploy:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: test_db
MYSQL_ROOT_HOST: '%' # ๋ชจ๋“  ํ˜ธ์ŠคํŠธ์—์„œ ์ ‘๊ทผ ํ—ˆ์šฉ
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
redis:
image: redis
ports:
- 6379:6379

steps:
- name: Github Repository ํŒŒ์ผ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
uses: actions/checkout@v4
Expand Down Expand Up @@ -90,9 +116,9 @@ jobs:
cd
cd /home/ubuntu/nest-server/current/FE
npm i
pm2 stop backend-server || true
npx pm2 stop backend-server || true
cd /home/ubuntu/nest-server/current/BE
pm2 start dist/main.js --name "backend-server"
npx pm2 start dist/main.js --name "backend-server"
# todo: # FrontEnd ๋ฐฐํฌ
# # Frontend ๋ฐฐํฌ
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/notify-pr-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: notify pr review

on:
pull_request:
types: [ review_requested ]

jobs:
notify:
runs-on: [ ubuntu-latest ]
steps:
- name: Notify PR Review
uses: naver/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
slackBotToken: ${{ secrets.SLACK_BOT_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.idea
.env
2 changes: 1 addition & 1 deletion BE/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ lerna-debug.log*
!.vscode/extensions.json

# dotenv environment variable files
.env
../.env
.env.development.local
.env.test.local
.env.production.local
Expand Down
2 changes: 1 addition & 1 deletion BE/.jest-test-results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":2,"numPassedTests":10,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":2,"numTotalTests":10,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1730881811395,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":203,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์œ ํšจํ•œ ์„ค์ •์œผ๋กœ ๊ฒŒ์ž„๋ฐฉ ์ƒ์„ฑ ์„ฑ๊ณต","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"์œ ํšจํ•œ ์„ค์ •์œผ๋กœ ๊ฒŒ์ž„๋ฐฉ ์ƒ์„ฑ ์„ฑ๊ณต"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":105,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๋นˆ title","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"๋นˆ title"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":68,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๋นˆ gameMode","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"๋นˆ gameMode"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":85,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์ž˜๋ชป๋œ gameMode","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"์ž˜๋ชป๋œ gameMode"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":83,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์ตœ์†Œ ์ธ์› ๋ฏธ๋‹ฌ","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"์ตœ์†Œ ์ธ์› ๋ฏธ๋‹ฌ"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":79,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์ตœ๋Œ€ ์ธ์› ์ดˆ๊ณผ","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"์ตœ๋Œ€ ์ธ์› ์ดˆ๊ณผ"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":91,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์ž˜๋ชป๋œ boolean ํƒ€์ž…","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"์ž˜๋ชป๋œ boolean ํƒ€์ž…"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":69,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๋ฐฉ์ƒ์„ฑ์‹œ ์„œ๋ฒ„๋Š” ์˜ฌ๋ฐ”๋ฅธ 6์ž๋ฆฌ ์ˆซ์ž(PIN)์„ ์‘๋‹ตํ•ด์•ผํ•œ๋‹ค.","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"๋ฐฉ์ƒ์„ฑ์‹œ ์„œ๋ฒ„๋Š” ์˜ฌ๋ฐ”๋ฅธ 6์ž๋ฆฌ ์ˆซ์ž(PIN)์„ ์‘๋‹ตํ•ด์•ผํ•œ๋‹ค."},{"ancestorTitles":["GameGateway (e2e)","chatMessage ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":126,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) chatMessage ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๊ฐ™์€ Room์˜ ํ”Œ๋ ˆ์ด์–ด๋“ค์—๊ฒŒ ๋ธŒ๋กœ๋“œ์บ์ŠคํŒ… ์„ฑ๊ณต","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"๊ฐ™์€ Room์˜ ํ”Œ๋ ˆ์ด์–ด๋“ค์—๊ฒŒ ๋ธŒ๋กœ๋“œ์บ์ŠคํŒ… ์„ฑ๊ณต"}],"endTime":1730881821139,"message":"","name":"D:\\nest_project\\QuizGround\\web10-QuizGround\\BE\\test\\game.e2e-spec.ts","startTime":1730881811553,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["AppController (e2e)"],"duration":158,"failureDetails":[],"failureMessages":[],"fullName":"AppController (e2e) / (GET)","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"passed","title":"/ (GET)"}],"endTime":1730881821996,"message":"","name":"D:\\nest_project\\QuizGround\\web10-QuizGround\\BE\\test\\app.e2e-spec.ts","startTime":1730881821176,"status":"passed","summary":""}],"wasInterrupted":false}
{"numFailedTestSuites":1,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":10,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":1,"numTodoTests":0,"numTotalTestSuites":2,"numTotalTests":10,"openHandles":[{}],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1731590376451,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":242,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์œ ํšจํ•œ ์„ค์ •์œผ๋กœ ๊ฒŒ์ž„๋ฐฉ ์ƒ์„ฑ ์„ฑ๊ณต","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"์œ ํšจํ•œ ์„ค์ •์œผ๋กœ ๊ฒŒ์ž„๋ฐฉ ์ƒ์„ฑ ์„ฑ๊ณต"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":93,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๋นˆ title์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"๋นˆ title์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":80,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๋นˆ gameMode์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"๋นˆ gameMode์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":87,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์ž˜๋ชป๋œ gameMode์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"์ž˜๋ชป๋œ gameMode์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ"},{"ancestorTitles":["GameGateway (e2e)","createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":78,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) createRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์ตœ์†Œ ์ธ์› ๋ฏธ๋‹ฌ์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"์ตœ์†Œ ์ธ์› ๋ฏธ๋‹ฌ์ธ ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒ"},{"ancestorTitles":["GameGateway (e2e)","joinRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":87,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) joinRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์กด์žฌํ•˜๋Š” ๋ฐฉ ์ฐธ์—ฌ ์„ฑ๊ณต","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"์กด์žฌํ•˜๋Š” ๋ฐฉ ์ฐธ์—ฌ ์„ฑ๊ณต"},{"ancestorTitles":["GameGateway (e2e)","joinRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":73,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) joinRoom ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๋ฐฉ ์ฐธ์—ฌ ์‹คํŒจ","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"์กด์žฌํ•˜์ง€ ์•Š๋Š” ๋ฐฉ ์ฐธ์—ฌ ์‹คํŒจ"},{"ancestorTitles":["GameGateway (e2e)","chatMessage ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":182,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) chatMessage ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๊ฐ™์€ ๋ฐฉ์˜ ๋ชจ๋“  ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ๋ฉ”์‹œ์ง€ ์ „์†ก","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"๊ฐ™์€ ๋ฐฉ์˜ ๋ชจ๋“  ํ”Œ๋ ˆ์ด์–ด์—๊ฒŒ ๋ฉ”์‹œ์ง€ ์ „์†ก"},{"ancestorTitles":["GameGateway (e2e)","updatePosition ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":133,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) updatePosition ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ์œ„์น˜ ์—…๋ฐ์ดํŠธ ์„ฑ๊ณต","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"์œ„์น˜ ์—…๋ฐ์ดํŠธ ์„ฑ๊ณต"},{"ancestorTitles":["GameGateway (e2e)","startGame ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ"],"duration":1613,"failureDetails":[],"failureMessages":[],"fullName":"GameGateway (e2e) startGame ์ด๋ฒคํŠธ ํ…Œ์ŠคํŠธ ๊ฒŒ์ž„ ์‹œ์ž‘ ์„ฑ๊ณต","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"๊ฒŒ์ž„ ์‹œ์ž‘ ์„ฑ๊ณต"}],"endTime":1731590391795,"message":"","name":"/Users/song-build/IdeaProjects/web10-QuizGround/BE/test/game.e2e-spec.ts","startTime":1731590376502,"status":"passed","summary":""},{"assertionResults":[],"coverage":{},"endTime":1731590392117,"message":" \u001b[1mโ— \u001b[22mTest suite failed to run\n\n Your test suite must contain at least one test.\n\n \u001b[2mat onResult (\u001b[22m../node_modules/@jest/core/build/TestScheduler.js\u001b[2m:133:18)\u001b[22m\n \u001b[2mat \u001b[22m../node_modules/@jest/core/build/TestScheduler.js\u001b[2m:254:19\u001b[22m\n \u001b[2mat \u001b[22m../node_modules/emittery/index.js\u001b[2m:363:13\u001b[22m\n at Array.map (<anonymous>)\n \u001b[2mat Emittery.emit (\u001b[22m../node_modules/emittery/index.js\u001b[2m:361:23)\u001b[22m\n","name":"/Users/song-build/IdeaProjects/web10-QuizGround/BE/test/app.e2e-spec.ts","startTime":1731590392117,"status":"failed","summary":""}],"wasInterrupted":false}
Loading

0 comments on commit 221239a

Please sign in to comment.