Merge pull request #173 from JLG-WOCFR-DEV/codex/add-responsive-layou… #10
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 | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| jobs: | |
| phpunit: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_DATABASE: wordpress_test | |
| MYSQL_USER: wp | |
| MYSQL_PASSWORD: password | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: ['3306:3306'] | |
| options: >- | |
| --health-cmd="mysqladmin ping -h localhost -uroot -proot" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| strategy: | |
| matrix: | |
| php-version: ['8.1', '8.2'] | |
| env: | |
| WP_TESTS_DB_NAME: wordpress_test | |
| WP_TESTS_DB_USER: wp | |
| WP_TESTS_DB_PASSWORD: password | |
| WP_TESTS_DB_HOST: 127.0.0.1 | |
| WP_TESTS_TABLE_PREFIX: wptests_ | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: none | |
| tools: composer | |
| - name: Install dependencies | |
| working-directory: supersede-css-jlg-enhanced | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Prepare database | |
| run: | | |
| mysql -h 127.0.0.1 -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress_test;" | |
| mysql -h 127.0.0.1 -uroot -proot -e "GRANT ALL PRIVILEGES ON wordpress_test.* TO 'wp'@'%' IDENTIFIED BY 'password';" | |
| - name: Run PHPUnit | |
| working-directory: supersede-css-jlg-enhanced | |
| run: vendor/bin/phpunit |