Skip to content

Commit

Permalink
Merge branch 'WordPress:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienserre authored May 21, 2024
2 parents e03c42a + 7fc2227 commit 137ba85
Show file tree
Hide file tree
Showing 17 changed files with 5,853 additions and 85 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit Tests

on:
pull_request:
push:
workflow_dispatch:

jobs:
test-php:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '7.4'

env:
WP_ENV_PHP_VERSION: ${{ matrix.php }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install
run: npm install

- name: Setup Environment
run: |
rm composer.lock
npm run setup
- name: Test
run: npm run test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
vendor
vendor
coverage
node_modules
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"phpVersion": "7.4",
"plugins": [
".",
"https://downloads.wordpress.org/plugin/posts-to-posts.latest-stable.zip"
]
}
17 changes: 17 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,25 @@
"scribu/scb-framework" : "dev-master@dev",
"psr/log" : "~1.0"
},
"require-dev" : {
"phpunit/phpunit": "^7",
"spatie/phpunit-watcher": "^1.23",
"yoast/phpunit-polyfills": "^1.0"
},
"scripts" : {
"test": "phpunit",
"test:watch": "phpunit-watcher watch < /dev/tty",
"test:coverage": "php -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-html coverage"
},
"autoload" : {
"classmap": ["lib"],
"files" : ["lib/runner.php", "lib/template.php"]
},
"config": {
"allow-plugins": {
"composer/installers": true
},
"_process-timeout-comment": "Work around `test:watch` timeout, see https://github.com/spatie/phpunit-watcher/issues/63#issuecomment-545633709",
"process-timeout": 0
}
}
Loading

0 comments on commit 137ba85

Please sign in to comment.