Skip to content

[#192] ์„œ๋ฒ„ props ๋Œ€์‹  useSearchParams ์‚ฌ์šฉํ•˜์—ฌ ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ • #248

[#192] ์„œ๋ฒ„ props ๋Œ€์‹  useSearchParams ์‚ฌ์šฉํ•˜์—ฌ ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ •

[#192] ์„œ๋ฒ„ props ๋Œ€์‹  useSearchParams ์‚ฌ์šฉํ•˜์—ฌ ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ • #248

Workflow file for this run

name: Test and Lint
on:
push:
branches:
- 'main'
- 'dev'
pull_request:
branches:
- '**'
permissions:
contents: write
issues: write
pull-requests: write
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
# 1. ์ฝ”๋“œ ์ฒดํฌ์•„์›ƒ
- name: Checkout repository
uses: actions/checkout@v3
# 2. Node.js ์„ค์ •
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# 3. ์˜์กด์„ฑ ์„ค์น˜
- name: Install dependencies
run: npm install --legacy-peer-deps
# 4. Lint ๊ฒ€์‚ฌ
- name: Run Lint
run: npm run lint
# 5. Jest ํ…Œ์ŠคํŠธ ์‹คํ–‰ ๋ฐ ์ปค๋ฒ„๋ฆฌ์ง€ ๋ฆฌํฌํŠธ ์ƒ์„ฑ
- name: Run Jest Tests with Coverage
id: jest-step
run: npm run test -- --coverage
outputs:
build-test-status: ${{ steps.jest-step.outcome }}
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
# 1. ์ฝ”๋“œ ์ฒดํฌ์•„์›ƒ
- name: Checkout repository
uses: actions/checkout@v3
# 2. Node.js ์„ค์ •
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# 3. ์˜์กด์„ฑ ์„ค์น˜
- name: Install dependencies
run: npm install --legacy-peer-deps
# 4. Lint ๊ฒ€์‚ฌ
- name: Run Lint
id: lint-step
run: npm run lint
outputs:
lint-status: ${{ steps.lint-step.outcome }}
comment:
name: Add Comment
runs-on: ubuntu-latest
needs:
- build-and-test
- lint
# PR์—์„œ๋งŒ comment ๋“ฑ๋ก ์‹คํ–‰
if: github.event_name == 'pull_request'
steps:
- name: Post PR Comment
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### โœ… GitHub Actions ์‹คํ–‰ ๊ฒฐ๊ณผ
- **Build and Test**: ${{ needs.build-and-test.outputs.build-test-status == 'success' && '์„ฑ๊ณต ๐ŸŽ‰' || '์‹คํŒจ โŒ' }}
- **Lint**: ${{ needs.lint.outputs.lint-status == 'success' && '์„ฑ๊ณต ๐ŸŽ‰' || '์‹คํŒจ โŒ' }}