Merge pull request #930 from GatherPress/tested-up-to #310
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
name: E2E Tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
playwright: | |
name: Playwright Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log debug information | |
run: | | |
npm --version | |
node --version | |
git --version | |
php --version | |
composer --version | |
- name: Install NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
# Enable built-in functionality for caching and restoring dependencies, which is disabled by default. | |
# The actions/setup-node uses actions/cache under the hood. | |
# https://github.com/actions/setup-node#caching-global-packages-data | |
cache: 'npm' | |
- name: NPM install | |
run: npm ci --legacy-peer-deps | |
- name: Playwright install | |
run: npx playwright install --with-deps | |
- name: Run Playwright | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WP_ADMIN_PASSWORD: ${{ secrets.WP_ADMIN_PASSWORD }} | |
run: npm run test:e2e | |
if: ${{ success() || failure() }} |