feat: add Playwright testing framework and initial test setup for bro…#55
Draft
feat: add Playwright testing framework and initial test setup for bro…#55
Conversation
|
Comment on lines
+9
to
+39
| timeout-minutes: 60 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Install Playwright Browsers | ||
| run: pnpm exec playwright install --with-deps | ||
| working-directory: browser | ||
|
|
||
| - name: Run Playwright tests (excluding extension tests that require build) | ||
| run: pnpm test --grep-invert extension | ||
| working-directory: browser | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: playwright-report | ||
| path: browser/playwright-report/ | ||
| retention-days: 30 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix this problem, add a permissions section with least-privilege settings. In this workflow, the only needed permission is likely contents: read, which grants read access to repository contents, enabling actions like checkout and reading code, but preventing pushes or sensitive changes. This can be added either at the root (applies to all jobs) or at the test job level. Since there is only one job, adding at the root is clear and future-proof.
Change required:
- At the top (after the
namefield), insert:permissions: contents: read
- No new methods, definitions, or imports are needed, as this is a static configuration in YAML.
Suggested changeset
1
.github/workflows/playwright.yml
| @@ -1,4 +1,6 @@ | ||
| name: Playwright Tests | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| push: | ||
| branches: [ main ] |
Copilot is powered by AI and may make mistakes. Always verify output.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


…wser extension