Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix PHP 8 unit testing #599

Merged
merged 8 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions .github/workflows/build-test-measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Configure npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
cache: npm

- name: Install Node dependencies
run: npm ci
Expand Down Expand Up @@ -295,6 +284,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Get Composer Cache Directory
id: composer-cache
Expand All @@ -311,18 +301,6 @@ jobs:
- name: Install Composer dependencies
run: composer install --prefer-dist --ignore-platform-reqs --no-progress --no-interaction

- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Configure npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Install Node dependencies
run: npm ci
env:
Expand All @@ -339,9 +317,6 @@ jobs:
- name: Install WP tests
run: bash bin/ci/install-wp-tests.sh wordpress_test root '' 127.0.0.1:${{ job.services.mysql.ports['3306'] }} ${{ matrix.wp }} true

- name: Post install of WP tests
run: bash bin/ci/after-wp-install.sh ${{ matrix.wp }} /tmp/wordpress-tests

- name: Setup PCOV
if: ${{ matrix.coverage == true }}
# phpdocumentor/reflection has to be removed as it makes use of an outdated dependency, making pcov/clobber
Expand All @@ -366,7 +341,7 @@ jobs:

- name: Upload code coverage report
if: ${{ matrix.coverage == true }}
uses: codecov/codecov-action@v1.5.2
uses: codecov/codecov-action@v2.0.2
with:
file: ${{ env.WP_CORE_DIR }}/src/wp-content/plugins/pwa/build/logs/clover.xml
flags: php,unit
Expand Down
51 changes: 0 additions & 51 deletions bin/ci/after-wp-install.sh

This file was deleted.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"automattic/vipwpcs": "^2.2",
"civicrm/composer-downloads-plugin": "^3.0",
"dealerdirect/phpcodesniffer-composer-installer": "0.7.1",
"phpcompatibility/phpcompatibility-wp": "2.1.1",
"php-stubs/wordpress-stubs": "^5.3.2",
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
"wp-coding-standards/wpcs": "2.3.0"
"phpcompatibility/phpcompatibility-wp": "2.1.1",
"wp-coding-standards/wpcs": "2.3.0",
"yoast/wp-test-utils": "^0.2.2"
},
"config": {
"platform": {
Expand Down
Loading