Skip to content

Commit

Permalink
feat: use WordPress plugin dependency feature (#358)
Browse files Browse the repository at this point in the history
* feat: use WordPress plugin dependency feature

* test: fix tests

* fix: format files

* chore(deps-dev): support env

* test: remove dependency

* test: fix test bootstrap

* chore: update CI pipeline WP version

---------

Co-authored-by: Felipe Dalcin <[email protected]>
  • Loading branch information
greatislander and fdalcin authored Apr 8, 2024
1 parent 4dad516 commit 509c339
Show file tree
Hide file tree
Showing 5 changed files with 1,366 additions and 5,853 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
matrix:
php: [8.1, 8.2]
os: [ubuntu-20.04]
wordpress: [6.4.3, latest]
wordpress: ['6.5', latest]
include:
- experimental: true
- experimental: false
php: 8.1
wordpress: 6.4.3
wordpress: '6.5'

name: Tests - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }}

Expand Down Expand Up @@ -61,8 +61,12 @@ jobs:
tools: composer
coverage: pcov

- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Install PHP dependencies
run: |
composer install --no-interaction --no-progress
git clone --depth=1 https://github.com/pressbooks/pressbooks.git ../pressbooks
cd ../pressbooks && composer install --no-dev
cd ../pressbooks-network-catalog
- name: Install WP tests
run: bash install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }}
Expand Down Expand Up @@ -107,8 +111,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
with:
files:
${{github.workspace}}/*.zip
files: ${{github.workspace}}/*.zip

- name: Trigger Bedrock Update
if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/production') && matrix.experimental == false
Expand Down
4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.10",
"pressbooks/pressbooks": "dev-dev",
"yoast/phpunit-polyfills": "^1.1"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": {
"pressbooks/pressbooks": "source"
},
"allow-plugins": {
"composer/installers": true
}
Expand Down
Loading

0 comments on commit 509c339

Please sign in to comment.