Skip to content

Commit

Permalink
Merge pull request #595 from jiphyeonjeon-42/develop
Browse files Browse the repository at this point in the history
ci: 2023-07-23 정기 배포
  • Loading branch information
scarf005 authored Jul 23, 2023
2 parents 113dbe0 + d57449d commit 8abb658
Show file tree
Hide file tree
Showing 113 changed files with 975 additions and 254 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 공식 문서 배포

on:
push:
branches:
- develop
permissions:
contents: write
defaults:
run:
working-directory: docs

jobs:
docs:
name: Deploy Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
clear-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ jobs:
working-directory: backend
run: pnpm install

- name: build backend
working-directory: backend
run: pnpm build
# TODO(@scarf005): #594
# - name: build backend
# working-directory: backend
# run: pnpm build

- name: create .env file
run: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
pull_request:

jobs:
test:
name: Test PR
runs-on: ubuntu-latest
environment: development

steps:
- name: Checkout
uses: actions/checkout@v3

- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: setup pnpm
run: |
corepack enable
corepack prepare pnpm@latest-8 --activate
pnpm config set store-dir .pnpm-store
- name: install dependencies
working-directory: backend
run: pnpm install

# TODO(@scarf005): #594
# - name: build backend
# working-directory: backend
# run: pnpm build

# TODO: 테스트 실행
7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 💻 기술 스택
![typescript](https://img.shields.io/badge/TypeScript-^4.5.5-3178C6?logo=TypeScript) ![Express](https://img.shields.io/badge/Express-^4.17.2-000000?logo=Express) ![jest](https://img.shields.io/badge/Jest-^27.5.1-C21325?logo=Jest) ![.ENV](https://img.shields.io/badge/.ENV-^2.3.3-ECD53F?logo=.ENV) ![MySQL2](https://img.shields.io/badge/MySQL2-^2.3.3-4479A1?logo=MySQL) ![docker-compose](https://img.shields.io/badge/docker--compose-v2-2496ED?logo=Docker) ![swagger](https://img.shields.io/badge/swagger-3.x-85EA2D?logo=swagger)

# 🗒 ERD (Updated at 2022.10.26)
# 🗄️ERD (Updated at 2022.10.26)
![erd_backend](https://user-images.githubusercontent.com/50291995/198007446-0259fd24-1b8a-4d40-a2b8-cb8cce2bddc2.png)

# 💡 기능 관련 건의
Expand Down
20 changes: 9 additions & 11 deletions backend/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,26 @@
"root": true,
"extends": ["airbnb-base", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "import"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"ts": "never",
"json": "never"
}
],
"import/extensions": "off",
"linebreak-style": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": { "extensions": [".js", ".jsx", ".ts", ".tsx"] }
"node": { "extensions": [".js", ".jsx", ".ts", ".tsx"] },
"typescript": {
"project": "./tsconfig.json"
}
}
}
}
9 changes: 6 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ RUN npm install --global pnpm
COPY . .
RUN pnpm install

RUN pnpm install --global pm2
RUN pm2-runtime --version || exit 1
ENTRYPOINT [ "pnpm", "prod" ]

ENTRYPOINT [ "sh", "start.sh"]
# RUN pnpm install --global pm2
# RUN pm2-runtime --version || exit 1

# TODO(@scarf005): #594
# ENTRYPOINT [ "sh", "start.sh"]
7 changes: 6 additions & 1 deletion backend/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]sx?$': ['ts-jest', {
tsconfig: './tsconfig.json',
}],
},
};
9 changes: 5 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"node": ">=20.3.1 || >=18.16.1 <20.0.0"
},
"scripts": {
"start": "node dist/server.js",
"build": "npx tsc -p ./tsconfig.prod.json",
"dev": "nodemon --watch \"src/**/*.ts\" --exec \"ts-node\" src/server.ts",
"prod": "npx tsc -p ./tsconfig.prod.json && npm start",
"start": "ts-node -r tsconfig-paths/register --project ./tsconfig.prod.json src/server.ts",
"build": "echo '번들러 사용중이지 않아 빌드시 tsconfig paths 적용이 불가합니다' && exit 1",
"dev": "nodemon --watch \"src/**/*.ts\" --exec ts-node -r tsconfig-paths/register src/server.ts",
"prod": "pnpm start",
"lint": "eslint --fix --ext .js,.ts src",
"test": "jest"
},
Expand All @@ -36,6 +36,7 @@
"@typescript-eslint/parser": "^5.60.0",
"eslint": "^8.43.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"jest": "^29.5.0",
"nodemon": "^2.0.22",
Expand Down
Loading

0 comments on commit 8abb658

Please sign in to comment.