Skip to content

Commit

Permalink
Merge pull request #37 from woowa-techcamp-2021/develop
Browse files Browse the repository at this point in the history
0.1.0
  • Loading branch information
Choi-Jinwoo authored Aug 16, 2021
2 parents 2a29206 + 5ea7b0a commit 0c8ecbf
Show file tree
Hide file tree
Showing 95 changed files with 32,202 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/reviewer-lottery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
groups:
- name: chakani
reviewers: 3
usernames:
- juyoungpark718
- sanginchun
- momongss
- Choi-Jinwoo
80 changes: 80 additions & 0 deletions .github/workflows/dev-server-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Develop Server CD

on:
push:
branches:
- develop
jobs:
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
server/src/**/*.+(ts|tsx)
FILES: |
server/package.json
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/develop.key
chmod 600 ~/.ssh/develop.key
cat >>~/.ssh/config <<END
Host develop
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/develop.key
StrictHostKeyChecking no
END
env:
SSH_HOST: ${{ secrets.DEV_HOSTNAME }}
SSH_USER: ${{ secrets.DEV_USERNAME }}
SSH_KEY: ${{ secrets.DEV_PRIVATE_KEY }}
- name: Checkout and Pull origin
run: ssh develop 'cd ~/store-4 && git checkout develop && git pull origin'

- name: if changed dependencies, install dependencies
run: ssh develop 'cd ~/store-4/server && npm i'
if: env.GIT_MATCHED_FILES

- name: Reload Pm2
run: ssh develop 'cd ~/store-4/server && npm run build && sudo pm2 reload store-4'
if: env.GIT_DIFF
frontend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
client/src/**/*.+(ts|tsx)
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/develop.key
chmod 600 ~/.ssh/develop.key
cat >>~/.ssh/config <<END
Host develop
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/develop.key
StrictHostKeyChecking no
END
env:
SSH_HOST: ${{ secrets.DEV_HOSTNAME }}
SSH_USER: ${{ secrets.DEV_USERNAME }}
SSH_KEY: ${{ secrets.DEV_PRIVATE_KEY }}
- name: Run build script && Sync build files to server
run: cd client && npm i && npm run build && rsync -avz ./dist/ develop:~/store-4/client/dist
if: env.GIT_DIFF



23 changes: 23 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: NodeJS CI - jest

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use NodeJS 14.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
working-directory: client
- run: npm run test
working-directory: client
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS CI - lint

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
working-directory: client
- run: npm run lint
working-directory: client

- run: npm ci
working-directory: server
- run: npm run lint
working-directory: server
13 changes: 13 additions & 0 deletions .github/workflows/reviewer-lottery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Reviewer lottery"
on:
pull_request:
types: [opened, ready_for_review, reopened]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: uesteibar/reviewer-lottery@v1
with:
repo-token: ${{ secrets.JYP_TOKEN }}
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos
3 changes: 3 additions & 0 deletions client/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
}
1 change: 1 addition & 0 deletions client/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERVER_URL=
24 changes: 24 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {},
};
4 changes: 4 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.DS_Store
.env
dist
7 changes: 7 additions & 0 deletions client/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: true,
singleQuote: true,
printWidth: 100,
};
3 changes: 3 additions & 0 deletions client/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module '*.png';
declare module '*.jpg';
declare module '*.svg';
6 changes: 6 additions & 0 deletions client/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
testEnvironment: 'jsdom',
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2|svg)$': 'jest-transform-stub',
},
};
Loading

0 comments on commit 0c8ecbf

Please sign in to comment.