Internal: [V2] Implement D&D behavior [ED-16166] #41760
Workflow file for this run
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: Lighthouse | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**.txt' | |
- '.github/config.json' | |
- 'bin/**' | |
- '.gitignore' | |
- 'docs/**' | |
merge_group: | |
# 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-lh: | |
name: Build plugin | |
uses: ./.github/workflows/build.yml | |
lighthouse_test: | |
name: Lighthouse test - WP latest on PHP 7.4 | |
runs-on: ubuntu-latest | |
needs: [build-plugin-lh] | |
if: ${{ github.event.pull_request.title == null || needs.build-plugin-lh.outputs.changelog_diff }} | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build-plugin-lh.outputs.artifact_name }} | |
path: ./elementor | |
- name: Setup wp-env | |
uses: elementor/elementor-editor-github-actions/actions/setup-wp-env@master | |
with: | |
php: '7.4' | |
active-theme: 'hello-elementor' | |
plugins: |- | |
./elementor | |
themes: |- | |
https://downloads.wordpress.org/theme/hello-elementor.zip | |
mappings: |- | |
elementor-templates:./tests/playwright/templates | |
- name: Import Templates | |
uses: elementor/elementor-editor-github-actions/actions/setup-elementor-env@master | |
with: | |
env: 'testing' | |
templates: |- | |
elementor-templates | |
- name: Install lhci | |
run: npm install --no-package-lock --no-save @lhci/cli@0.14.0 | |
- name: Run Lighthouse tests | |
run: | | |
bash "${GITHUB_WORKSPACE}/.github/scripts/run-lighthouse-tests.sh" | |
- name: Save HTML dumps on failure | |
if: failure() | |
run: | | |
bash "${GITHUB_WORKSPACE}/.github/scripts/save-lighthouse-pages-html-dumps.sh" | |
- name: Upload Lighthouse reports on failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lighthouseci-reports | |
path: ${{ github.workspace }}/.lighthouseci/reports/**/* | |
retention-days: 7 | |
- name: Upload Lighthouse HTML dumps on failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lighthouseci-htmls | |
path: ${{ github.workspace }}/.lighthouseci/dumps/**/* | |
retention-days: 7 | |
lighthouse: | |
needs: lighthouse_test | |
if: ${{ always() }} # Will be run even if 'Lighthouse' matrix will be skipped | |
runs-on: ubuntu-22.04 | |
name: Lighthouse - Test Results | |
steps: | |
- name: Test status | |
run: echo "Test status is - ${{ needs.lighthouse_test.result }}" | |
- name: Check lighthouse_test matrix status | |
if: ${{ needs.lighthouse_test.result != 'success' && needs.lighthouse_test.result != 'skipped' }} | |
run: exit 1 |