Skip to content

Commit

Permalink
Merge pull request #95 from Automattic/fix/ci-use-valid-runs-on
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones authored Aug 8, 2024
2 parents 461d2c8 + 0f5414d commit 7ec3b6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ on:
jobs:
test:
name: WP ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
# Ubuntu-20.x includes MySQL 8.0, which causes `caching_sha2_password` issues with PHP < 7.4
# https://www.php.net/manual/en/mysqli.requirements.php
# TODO: change to ubuntu-latest when we no longer support PHP < 7.4
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

env:
WP_VERSION: ${{ matrix.wordpress }}
Expand Down Expand Up @@ -72,8 +69,12 @@ jobs:
- name: Start MySQL Service
run: sudo systemctl start mysql.service

- name: Setting mysql_native_password for PHP <= 7.3
if: ${{ matrix.php <= 7.3 }}
run: mysql -u root -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'";

- name: Prepare environment for integration tests
run: composer prepare-ci
run: composer prepare-ci ${{ matrix.wordpress }}

- name: Run integration tests (single site)
if: ${{ matrix.php != 8.0 }}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7",
"squizlabs/php_codesniffer": "^3.5",
"wp-coding-standards/wpcs": "^2.3.0",
"yoast/phpunit-polyfills": "^0.2.0"
"yoast/phpunit-polyfills": "^0.2.0 || ^1"
},
"scripts": {
"cbf": [
Expand Down

0 comments on commit 7ec3b6a

Please sign in to comment.