Skip to content

Commit 487f57c

Browse files
committed
ci: run the Playwright tests on every deployment
Whenever deploying the site, it is a good idea to run the tests afterwards. An alternative would be to run the tests before deploying, but there are challenges that would make this cumbersome: - For deployments, we run Hugo with a specific base URL, which could let the UI tests redirect to the site that we want to deploy to, and therefore fail to verify the locally-built site. - Even if an outside change (such as a change from the ProGit book repository) would break those tests, we would still want to deploy the site. This is better than falling behind just because no volunteer finds time to fix the issues. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 98c46ee commit 487f57c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/actions/deploy-to-github-pages/action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,17 @@ runs:
144144
await github.rest.issues.update({ ...req, state: 'closed' })
145145
}
146146
}
147+
148+
- name: Install @playwright/test
149+
shell: bash
150+
run: npm install @playwright/test
151+
- name: Run Playwright tests
152+
shell: bash
153+
env:
154+
PLAYWRIGHT_TEST_URL: ${{ steps.pages.outputs.base_url }}
155+
run: npx playwright test --project=chrome
156+
- uses: actions/upload-artifact@v4
157+
if: always()
158+
with:
159+
name: playwright-report
160+
path: playwright-report/

0 commit comments

Comments
 (0)