-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix Playwright GH Action #364
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,25 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: github.event.deployment_status.state == 'success' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm --prefix ./client i | ||
working-directory: ./client | ||
run: npm install | ||
- name: Install Playwright | ||
run: npx --prefix ./client playwright install --with-deps | ||
working-directory: ./client | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx --prefix ./client playwright test --reporter=html | ||
working-directory: ./client | ||
run: npx playwright test --reporter=html | ||
env: | ||
PLAYWRIGHT_TEST_BASE_URL: | ||
{{ "${{ github.event.deployment_status.environment_url }}" }} | ||
PLAYWRIGHT_TEST_USER_PASS: | ||
{{ "${{ secrets.PLAYWRIGHT_TEST_USER_PASS }}" }} | ||
PLAYWRIGHT_TEST_BASE_URL: {{ "${{ github.event.deployment_status.environment_url }}" }} | ||
PLAYWRIGHT_TEST_USER_PASS: {{ "${{ secrets.PLAYWRIGHT_TEST_USER_PASS }}" }} | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: playwright-report | ||
path: ./client/playwright-report/ | ||
retention-days: 30 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not for this PR (unless you want it to be), but one issue I observed the other day on a project was that the deployment failed and so we skipped running Playwright because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, makes sense. I will move this to GH issue for later. |
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.
I minor, but important, upgrade I think people often forget to do. 👍