-
Notifications
You must be signed in to change notification settings - Fork 1
add: playwright 자동화 ci 스크립트 추가 및 작동 테스트 #111
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughA new GitHub Actions workflow named "Playwright Tests" has been added to run Playwright end-to-end tests on pull requests targeting the main branch. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/playwright.yml (2)
3-5: Consider adding apushtrigger to catch direct commits tomain.CI will be skipped if someone bypasses PRs and pushes straight to
main.
A minimal addition keeps your current behaviour while covering that gap.pull_request: branches: [main] + + push: + branches: [main]
15-18: Turn on the built-in npm cache for substantially faster runs.
actions/setup-node@v4supports transparent caching (cache: 'npm').
Enabling it avoids reinstalling every dependency on each run.- - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' + - uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/playwright.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/playwright.yml (1)
25-27: Guarantee that an HTML report is produced before you attempt to upload it.
playwright-report/exists only when an HTML reporter is enabled.
Unless yourplaywright.config.*already setsreporter: 'html', the folder will be missing and the later upload step will fail.- - name: Run Playwright tests - run: npx playwright test + - name: Run Playwright tests + run: npx playwright test --reporter=line,html
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report | ||
| retention-days: 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard the artifact upload to avoid a hard failure when the report folder is absent.
upload-artifact errors if the given path does not exist.
Protect the step with a hash-based check so the workflow still completes even when no report is generated.
- - uses: actions/upload-artifact@v4
- if: always()
+ - uses: actions/upload-artifact@v4
+ if: always() && hashFiles('playwright-report/**') != ''
with:
name: playwright-report
path: playwright-report
retention-days: 30📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report | |
| retention-days: 30 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && hashFiles('playwright-report/**') != '' | |
| with: | |
| name: playwright-report | |
| path: playwright-report | |
| retention-days: 30 |
🤖 Prompt for AI Agents
In .github/workflows/playwright.yml around lines 28 to 33, the upload-artifact
step fails if the playwright-report folder does not exist. To fix this, add a
conditional check before the upload step that verifies the existence of the
playwright-report directory using a hash or file existence check. This will
prevent the step from running and failing when the report folder is absent,
allowing the workflow to complete successfully even if no report is generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
package.json (1)
6-13: Restore a generictestscript for ecosystem toolingMany editors, hooks and marketplace actions still invoke
npm testby default.
Consider making it an alias to both new commands to avoid breakage:"scripts": { "dev": "vite", @@ - "test:unit": "vitest", - "test:e2e": "playwright test" + "test": "npm run test:unit && npm run test:e2e", + "test:unit": "vitest", + "test:e2e": "playwright test" },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test
playwright CI 스크립트 작성 및 테스트
이 CI는 main/master 브랜치에 대한 코드 변경 시 Playwright 테스트를 자동으로 실행하고, 결과 리포트를 아티팩트로 업로드하는 파이프라인입니다. (보관 기간은 30일)
Summary by CodeRabbit