99 name : PHPUnit
1010 runs-on : ubuntu-24.04
1111
12- defaults :
13- run :
14- working-directory : vendor/typerocket/core
15-
1612 services :
1713 mysql :
1814 image : mysql:8.0
3733 --health-retries=5
3834
3935 steps :
40- - name : Checkout
41- uses : actions/checkout@v4
42- with :
43- path : vendor/typerocket/core
44-
4536 - name : Setup PHP
4637 uses : shivammathur/setup-php@v2
4738 with :
@@ -58,20 +49,28 @@ jobs:
5849 uses : actions/cache@v4
5950 with :
6051 path : ${{ steps.composer-cache.outputs.dir }}
61- key : ${{ runner.os }}-composer-${{ hashFiles('vendor/typerocket/core/ composer.lock') }}
52+ key : ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
6253 restore-keys : ${{ runner.os }}-composer-
6354
64- - name : Install dependencies
65- run : composer install --no-interaction --prefer-dist
55+ - name : Create TypeRocket root install
56+ run : |
57+ composer create-project --prefer-dist typerocket/typerocket .
58+ rm -rf vendor/typerocket/core
59+
60+ - name : Checkout core package
61+ uses : actions/checkout@v4
62+ with :
63+ path : vendor/typerocket/core
6664
6765 - name : Setup databases
6866 run : |
6967 mysql --host=127.0.0.1 --user=root --execute="SET NAMES utf8; CREATE DATABASE IF NOT EXISTS wordpress;"
7068 mysql --host=127.0.0.1 --user=root --execute="SET NAMES utf8; CREATE DATABASE IF NOT EXISTS tr_v51_alt;"
7169 mysql --host=127.0.0.1 --user=root --database=tr_v51_alt --execute="CREATE TABLE IF NOT EXISTS some_table (id INT, text_field VARCHAR(255));"
7270
73- - name : Setup WordPress
74- run : bin/setup-ci .sh
71+ - name : Setup TypeRocket test install
72+ run : vendor/typerocket/core/ bin/setup-github-actions .sh
7573
7674 - name : Run tests
75+ working-directory : vendor/typerocket/core
7776 run : vendor/bin/phpunit
0 commit comments