Skip to content

Commit

Permalink
Simplify PHPUnit setup (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Dec 9, 2024
1 parent 4505d67 commit b0dd58e
Show file tree
Hide file tree
Showing 13 changed files with 800 additions and 467 deletions.
2 changes: 0 additions & 2 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
.idea
.wordpress-org
build
build-cs
build-phpunit
docs
node_modules
patches
Expand Down
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10

- package-ecosystem: composer
directory: '/build-phpunit'
schedule:
interval: weekly
open-pull-requests-limit: 10
6 changes: 2 additions & 4 deletions .github/workflows/behat-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,14 @@ jobs:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
wordpress: [ 'latest' ]
include:
- php: '8.2'
- php: '8.3'
wordpress: 'latest'
coverage: true
- php: '7.4'
wordpress: '6.3'
- php: '8.3'
wordpress: 'trunk'
experimental: true
- php: '8.4'
wordpress: 'trunk'
experimental: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: 'latest'

- name: Validate Composer configuration
run: composer validate
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/php-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ jobs:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
wordpress: [ 'latest' ]
include:
- php: '7.4'
wordpress: '6.3'
- php: '8.2'
- php: '8.3'
wordpress: 'latest'
coverage: true
- php: '8.3'
Expand All @@ -71,6 +72,11 @@ jobs:
with:
php-version: ${{ matrix.php }}

- name: Install PHP dependencies
uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a
with:
composer-options: '--prefer-dist'

- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ build

node_modules/
vendor/
build-cs/vendor/
build-cs/composer.lock
build-phpunit/vendor/
build-phpunit/composer.lock

############
## OSes
Expand Down
6 changes: 0 additions & 6 deletions build-phpunit/composer.json

This file was deleted.

4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"wp-cli/wp-cli-tests": "^4.2.9",
"wp-cli/language-command": "^2.0",
"wp-cli/i18n-command": "^2.6",
"wp-cli/entity-command": "^2.8"
"wp-cli/entity-command": "^2.8",
"wp-phpunit/wp-phpunit": "^6.3",
"yoast/phpunit-polyfills": "^1.0"
},
"repositories": [
{
Expand Down
Loading

0 comments on commit b0dd58e

Please sign in to comment.