build: lock 파일 삭제 및 재설치 #189
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull request | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| test-and-build: | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 해당 저장소의 코드를 가져옵니다. | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # pnpm 설정 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| # Node 20 버전을 사용합니다. | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| cache-dependency-path: ./pnpm-lock.yaml | |
| # package.json에 명시된 의존성을 설치합니다. | |
| - name: Install Dependencies | |
| run: pnpm install | |
| # 빌드를 수행합니다. | |
| - name: Build | |
| run: pnpm build | |
| # 테스트를 수행합니다. | |
| - name: Run tests | |
| run: pnpm test | |
| # 실패 시 PR 리뷰 생성 | |
| - name: Create review on failure | |
| uses: actions/github-script@v7 | |
| if: failure() && github.event_name == 'pull_request' | |
| with: | |
| github-token: ${{ github.token }} | |
| script: | | |
| const pull_number = ${{ github.event.pull_request.number }}; | |
| await github.rest.pulls.createReview({ | |
| ...context.repo, | |
| pull_number, | |
| body: "❌ CI/CD 파이프라인이 실패했습니다. 빌드나 테스트 결과를 확인해주세요. -자동으로 작성됨-", | |
| event: "REQUEST_CHANGES" | |
| }); |