Bump semver from 6.3.0 to 6.3.1 in /tests/plugins-tester #25
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: Playwright Elements Regression | |
on: | |
push: | |
pull_request: | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
build-plugin: | |
name: Build plugin | |
runs-on: ubuntu-latest | |
if: startsWith( github.repository, 'elementor/' ) | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Install Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npx grunt build | |
- name: Save build to cache | |
uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./build/* | |
key: ${{ github.sha }} | |
Playwright: | |
name: Playwright test - WP ${{ matrix.wpCoreVersion }} on PHP ${{ matrix.phpVersion }} | |
runs-on: ubuntu-latest | |
needs: [build-plugin] | |
strategy: | |
matrix: | |
include: | |
- phpVersion: '7.4' | |
wpCoreVersion: 'latest' | |
env: | |
BASE_URL: 'http://localhost:8889' | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Install Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Restore build from cache | |
uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: ./build/* | |
key: ${{ github.sha }} | |
- name: Update wp-env.json file | |
env: | |
PHP_VERSION: ${{ matrix.phpVersion }} | |
WP_CORE_VERSION: ${{ matrix.wpCoreVersion }} | |
run: node ./.github/scripts/build-wp-env.js | |
- name: Install dependencies | |
run: npm ci | |
- name: Install WordPress environment | |
run: | | |
npm run start-local-server | |
npm run test:setup:elements-regression | |
- name: WordPress debug information | |
run: | | |
npx wp-env run cli "wp core version" | |
npx wp-env run cli "wp --info" | |
- name: Install playwright/test | |
run: | | |
npx playwright install chromium | |
- name: Run Playwright tests | |
run: | | |
npm run test:elements-regression | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-test-results | |
path: test-results/ | |
retention-days: 3 |