fix: fatal error #966
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: Test PHP | |
| on: | |
| push: | |
| branches-ignore: | |
| - "master" | |
| jobs: | |
| phpunit: | |
| name: Phpunit | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| cache: "yarn" | |
| - name: Install NPM deps | |
| run: | | |
| yarn install --frozen-lockfile | |
| - name: Install composer deps | |
| run: composer install | |
| - name: Install environment | |
| run: | | |
| npm run wp-env start | |
| - name: Prepare Database | |
| run: bash ./bin/e2e-after-setup.sh | |
| - name: Run the tests | |
| run: | | |
| npm run test:unit:php | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup PHP version | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "7.4" | |
| extensions: simplexml | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install composer | |
| run: | | |
| composer install --no-progress | |
| - name: Run phpstan | |
| run: composer run phpstan |