mirror of
https://github.com/elementor/hello-theme.git
synced 2026-07-27 14:01:37 +08:00
Some checks failed
PHPUnit / PHPUnit - WordPress 6.5 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.5 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.6 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.1 (push) Has been skipped
Build / Build theme (push) Failing after 1s
Lint / ESLint (push) Failing after 0s
Lint / PHPCS (push) Failing after 1s
PHPUnit / File Diff (push) Failing after 0s
PHPUnit / PHPUnit - WordPress 6.5 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.6 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.6 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.5 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.6 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.5 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.6 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - Test Results (push) Successful in 1s
107 lines
3.2 KiB
YAML
107 lines
3.2 KiB
YAML
name: PHPUnit
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '**.txt'
|
|
- '.github/config.json'
|
|
- 'bin/**'
|
|
- '.gitignore'
|
|
- 'docs/**'
|
|
branches:
|
|
- 'main'
|
|
- '3.*'
|
|
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:
|
|
file-diff:
|
|
runs-on: ubuntu-latest
|
|
name: File Diff
|
|
if: startsWith( github.repository, 'elementor/' )
|
|
outputs:
|
|
php_diff: ${{ steps.php_diff_files.outputs.diff }}
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v4
|
|
- name: Check PHP files diff
|
|
id: php_diff_files
|
|
uses: technote-space/get-diff-action@v6
|
|
with:
|
|
PATTERNS: |
|
|
**/*.php
|
|
**/*.twig
|
|
composer.+(json|lock)
|
|
.github/**/*.yml
|
|
install-wp-tests.sh
|
|
test:
|
|
runs-on: ubuntu-22.04
|
|
needs: [ 'file-diff' ]
|
|
if: ${{ github.event.pull_request.title == null || needs.file-diff.outputs.php_diff }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
wordpress_versions: ['nightly', 'latest', '6.6', '6.5']
|
|
php_versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
|
|
name: PHPUnit - WordPress ${{ matrix.wordpress_versions }} - PHP version ${{ matrix.php_versions }}
|
|
env:
|
|
WP_TESTS_DIR: /tmp/wordpress-tests-lib
|
|
WP_TESTS_ELEMENTOR_DIR: /tmp/elementor/elementor.php
|
|
WP_TESTS_HELLOPLUS_DIR: /tmp/hello-plus/hello-plus.php
|
|
THEME_FILE: functions.php
|
|
services:
|
|
mysql:
|
|
image: mysql:5.7
|
|
env:
|
|
MYSQL_ROOT_PASSWORD: root
|
|
ports:
|
|
- 3306
|
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php_versions }}
|
|
coverage: none
|
|
- name: Install Dependencies
|
|
run: |
|
|
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }} ${{ matrix.wordpress_versions }} true
|
|
composer update --no-interaction
|
|
- name: Copy theme folder to /tmp/wordpress/wp-content/themes/
|
|
run: |
|
|
cp -a $GITHUB_WORKSPACE /tmp/wordpress/wp-content/themes/
|
|
echo "Copied theme folder to /tmp/wordpress/wp-content/themes/$(basename $GITHUB_WORKSPACE)"
|
|
- name: Run tests
|
|
run: composer run test
|
|
|
|
test-result:
|
|
needs: test
|
|
if: ${{ always() }} # Will be run even if 'test' matrix will be skipped
|
|
runs-on: ubuntu-22.04
|
|
name: PHPUnit - Test Results
|
|
steps:
|
|
- name: Test status
|
|
run: echo "Test status is - ${{ needs.test.result }}"
|
|
- name: Check test matrix status
|
|
if: ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}
|
|
run: exit 1
|