Skip to content

Commit

Permalink
add deploing result
Browse files Browse the repository at this point in the history
  • Loading branch information
peccu committed Jan 4, 2024
1 parent 59b53de commit 16ec74c
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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

0 comments on commit 16ec74c

Please sign in to comment.