refactor(functions): replace manual validation with webmozart/assert #323
Workflow file for this run
This file contains hidden or 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
| name: PHP Unit Tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| phpunit: | |
| runs-on: ubuntu-latest | |
| services: | |
| mariadb: | |
| image: mariadb:10.11 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="healthcheck.sh --connect --innodb_initialized" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-versions: [ '8.1', '8.2', '8.3' ] | |
| wp-versions: [ 'latest' ] | |
| name: WordPress ${{ matrix.wp-versions }} / PHP ${{ matrix.php-versions }} | |
| env: | |
| WP_TESTS_DIR: /tmp/wordpress-tests-lib | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| - name: Check PHP Version | |
| run: php -v | |
| - name: Install SVN | |
| run: sudo apt-get update && sudo apt-get install -y subversion | |
| - name: Composer install | |
| run: composer install --optimize-autoloader --prefer-dist | |
| - name: Install WP Tests | |
| run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 ${{ matrix.wp-versions }} | |
| - name: phpunit tests | |
| run: ./vendor/bin/phpunit | |
| env: | |
| WP_TESTS_DIR: /tmp/wordpress-tests-lib | |
| WP_CORE_DIR: /tmp/wordpress |