Playwright Tests #1
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
name: Playwright Tests | |
on: | |
deployment_status: | |
jobs: | |
test: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
if: github.event.deployment_status.state == 'success' | |
steps: | |
- name: Log deployment status | |
run: | | |
echo "Deployment Status Details:" | |
echo "State: ${{ github.event.deployment_status.state }}" | |
echo "Environment: ${{ github.event.deployment_status.environment }}" | |
echo "Deployment URL: ${{ github.event.deployment_status.target_url }}" | |
echo "Full Deployment Status JSON:" | |
echo '${{ toJSON(github.event.deployment_status) }}' | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npm run e2e:ci | |
env: | |
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.environment_url }} | |
CI: true |