-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,13 +57,22 @@ jobs: | |
- name: Install Playwright Browsers | ||
run: bunx playwright install --with-deps | ||
- name: Run Playwright tests. If some error found, you maybe forgot to update snapshots | ||
run: bunx playwright test | ||
run: bunx playwright test --update-snapshots | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
# - name: Deploy result into github pages subdir | ||
# # https://github.com/marketplace/actions/github-pages-action | ||
# if: always() # We want this to always run, even if test fail prior to this step running | ||
# uses: peaceiris/[email protected] | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# destination_dir: .playwright-report | ||
# publish_dir: ./playwright-report/ | ||
# keep_files: true | ||
- name: Add notes into GitHub Step Summary | ||
if: always() | ||
run: | | ||
|
@@ -96,3 +105,29 @@ jobs: | |
run: bunx playwright install msedge && bunx playwright install chrome | ||
- name: Run your tests | ||
run: HOME=/root GITHUB_REPORT=1 bunx playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
- name: Deploy result into github pages subdir | ||
# https://github.com/marketplace/actions/github-pages-action | ||
if: always() # We want this to always run, even if test fail prior to this step running | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
destination_dir: .playwright-report | ||
publish_dir: ./playwright-report/ | ||
keep_files: true | ||
- name: Add notes into GitHub Step Summary | ||
if: always() | ||
run: | | ||
echo '# preview result' >> $GITHUB_STEP_SUMMARY | ||
echo '```sh' >> $GITHUB_STEP_SUMMARY | ||
echo 'mkdir tmp' >> $GITHUB_STEP_SUMMARY | ||
echo 'cd tmp' >> $GITHUB_STEP_SUMMARY | ||
echo 'mv ~/Downloads/playwright-report.zip ./' >> $GITHUB_STEP_SUMMARY | ||
echo 'unzip playwright-report.zip' >> $GITHUB_STEP_SUMMARY | ||
echo 'bunx vite preview --host 0.0.0.0 --outDir .' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY |