Skip to content

Commit

Permalink
Replacing the test installation script with a cool Composer package (#42
Browse files Browse the repository at this point in the history
)
  • Loading branch information
aldavigdis authored Feb 26, 2024
1 parent ba0bd7c commit b96f2fd
Show file tree
Hide file tree
Showing 8 changed files with 384 additions and 438 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ jobs:
MARIADB_USER: test
MARIADB_PASSWORD: password
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE : wp-test
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=10
strategy:
matrix:
php-versions: ['8.2', '8.3', '8.4']
wp-versions: ['master', '6.4.3', '6.3.3', '6.2.4', '6.1.5']
env:
DB_NAME: 'wp-test'
DB_HOST: '127.0.0.1'
DB_USER: root
DB_PASSWORD: password
XDEBUG_MODE: coverage
extensions: bcmath
key: cache-v1
key: cache-v1.1
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -43,10 +49,12 @@ jobs:
coverage: xdebug
tools: phpcs, phpunit
- name: Install dependencies
run: composer install
run: composer install --no-cache
- name: Figure out the PSR-4 autoload situation
run: composer dump-autoload -o --strict-psr
- name: PHPCS
run: ./vendor/bin/phpcs ./src/
- name: PHPUnit
run: bin/install-wp-tests.sh test root password 127.0.0.1 6.4 && ./vendor/bin/phpunit --testdox --coverage-text --coverage-filter=src
env:
WP_VERSION: ${{ matrix.wp-versions }}
run: ./vendor/bin/phpunit --testdox --coverage-text --coverage-filter=src
181 changes: 0 additions & 181 deletions bin/install-wp-tests.sh

This file was deleted.

12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^10.0",
"psy/psysh": "^0.12.0",
"yoast/phpunit-polyfills": "^2.0"
"yoast/phpunit-polyfills": "^2.0",
"aldavigdis/wp-tests-strapon": "dev-main"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/aldavigdis/wp-tests-strapon.git"
}
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand All @@ -18,5 +25,6 @@
"psr-4": {
"NineteenEightyFour\\NinteenEightyWoo\\": "src/"
}
}
},
"minimum-stability": "dev"
}
Loading

0 comments on commit b96f2fd

Please sign in to comment.