Skip to content

Commit

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

* test: fix tests

* fix: format files

* ci: remove token

* chore(deps-dev): support env

* test: remove dependency

* test: fix test bootstrap

* chore: update CI pipeline WP version

---------

Co-authored-by: Felipe Dalcin <felipe@pressbooks.com>
  • Loading branch information
greatislander and fdalcin authored Apr 4, 2024
1 parent cba3049 commit fc7d0ac
Show file tree
Hide file tree
Showing 6 changed files with 933 additions and 5,511 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/check-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
coverage: none

- name: Install dependencies
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.PAT_FOR_GITHUB_ACTIONS}}"} }'
run: |
export PATH="$HOME/.composer/vendor/bin:$PATH"
composer install --prefer-dist --no-interaction --no-progress
Expand Down
17 changes: 9 additions & 8 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 @@ -64,10 +64,12 @@ jobs:
tools: composer
coverage: pcov

- name: Install dependencies
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.PAT_FOR_GITHUB_ACTIONS}}"} }'
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-multi-institution
- name: Install WP tests
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }}
Expand Down Expand Up @@ -115,8 +117,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
6 changes: 1 addition & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"source": "https://github.com/pressbooks/pressbooks-multi-institution/"
},
"config": {
"preferred-install": {
"pressbooks/pressbooks": "source"
},
"allow-plugins": {
"composer/installers": true
}
Expand All @@ -45,8 +42,7 @@
},
"require-dev": {
"laravel/pint": "^1.10.6",
"yoast/phpunit-polyfills": "^1.1",
"pressbooks/pressbooks": "dev-dev"
"yoast/phpunit-polyfills": "^1.1"
},
"scripts": {
"fix": [
Expand Down
Loading

0 comments on commit fc7d0ac

Please sign in to comment.