Removed Composer config step #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the main Continuous Integration (CI) pipeline for the the stellarwp/plugin-framework package. | |
# | |
# Any time code is pushed to one of the main branches or a PR is opened, this pipeline should be | |
# run to ensure everything still works as designed and meets our coding standards. | |
name: CI Pipeline | |
# Execute on pushes to develop or main, as well as all PRs. | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
pull_request: | |
# Cancel outstanding jobs for this workflow/branch combo. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Execute all PHPUnit tests. | |
phpunit: | |
name: PHPUnit (PHP ${{ matrix.php-versions }}, WP ${{ matrix.wp-versions }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Run on all versions of PHP supported by WordPress. | |
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3'] | |
wp-versions: ['latest'] | |
services: | |
mysql: | |
image: mysql:${{ (matrix.php-versions < 7.4 && '5.7') || '8.0' }} | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: false | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure PHP environment | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, mysqli | |
coverage: none | |
- name: Remove unneeded Composer dependencies | |
run: | | |
composer remove --dev --no-progress --no-update | |
- uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
- name: Run PHPUnit | |
run: composer test:unit |