feat: add cleanup records #622
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 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches-ignore: | |
| - "master" | |
| jobs: | |
| code-sniff: | |
| name: PHP Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "7.4" | |
| tools: phpcs, phpcbf | |
| - name: Run Composer Install | |
| run: composer install --prefer-dist --no-progress --quiet | |
| continue-on-error: true | |
| - name: Run PHPCS | |
| run: composer run lint | |
| continue-on-error: false | |
| php-unit: | |
| name: PHPUnit | |
| needs: code-sniff | |
| runs-on: ubuntu-22.04 | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - 3306/tcp | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "7.4" | |
| tools: phpunit-polyfills | |
| - name: Install WordPress Test Suite | |
| run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }} | |
| - name: Install composer | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run PHP Unit | |
| run: composer run test | |
| 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 --prefer-dist --no-progress | |
| - name: Run phpstan | |
| run: composer run phpstan |