Skip to content

Commit 2f0be24

Browse files
committed
run tests with wp 5.7 and 5.8
1 parent f3cc5de commit 2f0be24

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/lint-test-deploy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434

3535
runs-on: ubuntu-latest
3636

37+
strategy:
38+
matrix:
39+
wp: [ '5.7', '5.8' ]
40+
3741
steps:
3842
- uses: actions/checkout@v2
3943

@@ -47,13 +51,17 @@ jobs:
4751
npm ci
4852
composer install
4953
54+
- name: "Configure environment with WP ${{ matrix.wp }}"
55+
run: |
56+
echo -e '{\n\t"core": "WordPress/WordPress#${{ matrix.wp }}"\n}' > ./.wp-env.override.json
57+
5058
- name: Install WordPress
5159
run: |
5260
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
5361
npm run wp-env start
5462
5563
- name: Running JavaScript E2E tests
56-
run: npm run test:e2e
64+
run: npm run test:e2e -- --config '{"env":{"cypress-wp-test-utils":{"wpVersion":${{ matrix.wp }}}}}'
5765

5866
- name: Running PHP unit tests
5967
run: npm run test:unit:php:ci

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"lint:md-js-fix": "wp-scripts lint-md-js --fix",
6262
"lint:pkg-json": "wp-scripts lint-pkg-json",
6363
"lint:php": "npm run wp-env run composer run-script lint",
64-
"test:e2e": "npm run cy:run",
64+
"test:e2e": "cypress run",
6565
"test:e2e-interactive": "npm run cy:open",
6666
"test:unit:js": "wp-scripts test-unit-js",
6767
"test:unit:php": "npm run wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/wp-bootstrap-blocks/phpunit.xml.dist --verbose'",

0 commit comments

Comments
 (0)