fix(deps): update react monorepo to v19 (major) #62
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: PHPUnit Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'feature/**' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:9.5 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: wordpress_test | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| strategy: | |
| matrix: | |
| php-version: ['8.1', '8.2', '8.3'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP ${{ matrix.php-version }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mysqli, pdo_mysql | |
| coverage: none | |
| - name: Get Composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Composer dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Checkout WordPress develop | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: WordPress/wordpress-develop | |
| path: wordpress-develop | |
| - name: Checkout database-module | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: TangibleInc/database-module | |
| path: database-module | |
| - name: Checkout fields | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: TangibleInc/fields | |
| path: fields | |
| - name: Setup WordPress test config | |
| run: | | |
| cp wordpress-develop/wp-tests-config-sample.php wordpress-develop/wp-tests-config.php | |
| sed -i "s/youremptytestdbnamehere/wordpress_test/" wordpress-develop/wp-tests-config.php | |
| sed -i "s/yourusernamehere/root/" wordpress-develop/wp-tests-config.php | |
| sed -i "s/yourpasswordhere/root/" wordpress-develop/wp-tests-config.php | |
| sed -i "s/localhost/127.0.0.1/" wordpress-develop/wp-tests-config.php | |
| - name: Run PHPUnit | |
| env: | |
| WORDPRESS_DEVELOP_DIR: ${{ github.workspace }}/wordpress-develop | |
| DATABASE_MODULE_DIR: ${{ github.workspace }}/database-module | |
| TANGIBLE_FIELDS_DIR: ${{ github.workspace }}/fields | |
| run: ./vendor/bin/phpunit |