[Fix] 채팅/팔로우 여러개 수정 #703
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: PR Coverage Report | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create initial Report | |
| if: always() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/coverage-initial-comment.cjs'); | |
| await script({ github, context }); | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check if tests exist | |
| id: check-tests | |
| run: | | |
| if find . -path ./node_modules -prune -o -path ./.next -prune -o -type f \( -name "*.test.*" -o -name "*.spec.*" \) -print | grep -q .; then | |
| echo "has_tests=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_tests=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Run tests with coverage | |
| id: test | |
| if: steps.check-tests.outputs.has_tests == 'true' | |
| run: pnpm run test:coverage | |
| continue-on-error: true | |
| - name: Download base coverage | |
| uses: dawidd6/action-download-artifact@v3 | |
| with: | |
| workflow: coverage-base.yml | |
| branch: main | |
| name: base-coverage | |
| path: base-coverage | |
| continue-on-error: true | |
| - name: Create coverage report | |
| if: always() | |
| uses: actions/github-script@v7 | |
| env: | |
| TEST_OUTCOME: ${{ steps.test.outcome }} | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/coverage-comment.cjs'); | |
| await script({ github, context }); | |
| - name: Fail if tests exist but failed | |
| if: steps.check-tests.outputs.has_tests == 'true' && steps.test.outcome == 'failure' | |
| run: | | |
| echo "::error::Tests failed! Please fix the failing tests." | |
| exit 1 |