Bump actions/setup-node from 5 to 6 #25
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: | |
| push: | |
| branches: [ develop ] | |
| pull_request: | |
| branches: [ develop ] | |
| jobs: | |
| playwright-test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install Playwright Browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Install and start wp-env | |
| timeout-minutes: 5 | |
| run: | | |
| npm install --global @wordpress/env | |
| wp-env start | |
| # Wait for the server to be ready | |
| while ! curl -s http://localhost:8888 > /dev/null; do | |
| sleep 1 | |
| done | |
| - name: Run Playwright tests | |
| run: npx playwright test | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 |