Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Docs ] Lint, Build, Assign Reviewer Workflow 생성 #13

Merged
merged 26 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: author

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- HwangDo
- Lee jin
- ptyoiy
- wuzoo

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
# assignees:
# - assigneeA

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
# numberOfAssignees: 2

# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip
11 changes: 11 additions & 0 deletions .github/workflows/assign-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Assign Reviewer

on:
pull_request:
types: [opened, reopened, ready_for_review]

jobs:
assign_reviewer:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
40 changes: 40 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check

on:
pull_request:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup Pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Check
run: |
set -o pipefail
pnpm check | tee result

- name: Print Summary
run: |
echo "## Check Result" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "$(cat result)" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY


28 changes: 28 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Development Deploy

on:
push:
branches:
- deploy

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }}-

- name: Build with Next.js
run: pnpm build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: build-app
path: .next
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것 잘 작성해주셔서 머지 이후 실제 artifact 다운로드 && deploy하는 부분 yml은 제가 이어서 해보겠습니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 ! 알겠습니다 ~

25 changes: 11 additions & 14 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@
"enabled": true
},
"javascript": {
"globals": [
"React"
]
"globals": ["React"]
},
"linter": {
"enabled": true,
"ignore": [
"node_modules",
"static",
".next"
],
"ignore": ["node_modules", "static", ".next"],
"rules": {
"all": true,
"complexity": {
"noUselessFragments": "off",
"noExcessiveCognitiveComplexity": "off",
"useArrowFunction": "error"
},
"a11y": {
"useButtonType": "off"
},
"style": {
"useSingleVarDeclarator": "off",
"noParameterAssign": "off",
Expand All @@ -45,7 +42,9 @@
"noUnusedImports": "warn"
},
"performance": {
"noAccumulatingSpread": "off"
"noAccumulatingSpread": "off",
"noBarrelFile": "off",
"noReExportAll": "off"
},
"nursery": {
"all": false
Expand All @@ -61,9 +60,7 @@
"indentWidth": 2
},
"files": {
"include": [
"**/*.ts",
"**/*.tsx"
]
"ignore": [".next/*"],
"include": ["**/*.ts", "**/*.tsx"]
}
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"generate-icon-export": "node ./generateIconExport.js"
"generate-icon-export": "node ./generateIconExport.js",
"lint": "biome lint",
"typecheck": "tsc --noEmit",
"check": "concurrently \"pnpm biome ci --formatter-enabled=false\" \"pnpm typecheck\""
},
"dependencies": {
"@vanilla-extract/css": "^1.15.5",
Expand All @@ -23,6 +25,7 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"@vanilla-extract/next-plugin": "^2.4.5",
"concurrently": "^9.0.0",
"typescript": "^5"
}
}
Loading
Loading