File tree Expand file tree Collapse file tree 1 file changed +18
-21
lines changed Expand file tree Collapse file tree 1 file changed +18
-21
lines changed Original file line number Diff line number Diff line change 9
9
phpunit :
10
10
name : Phpunit
11
11
runs-on : ubuntu-22.04
12
- services :
13
- mysql :
14
- image : mysql:5.7
15
- env :
16
- MYSQL_ROOT_PASSWORD : root
17
- ports :
18
- - 3306/tcp
19
- options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
20
12
steps :
21
- - name : Setup PHP version
22
- uses : shivammathur /setup-php@v2
13
+ - uses : actions/checkout@v4
14
+ - uses : actions /setup-node@v4
23
15
with :
24
- php-version : " 7.2"
25
- extensions : simplexml, mysql
26
- tools : phpunit-polyfills
27
- - name : Checkout source code
28
- uses : actions/checkout@v2
29
- - name : Install WordPress Test Suite
16
+ node-version : " 18"
17
+ cache : " yarn"
18
+ - name : Install NPM deps
19
+ run : |
20
+ yarn install --frozen-lockfile
21
+ - name : Install composer deps
22
+ run : composer install
23
+ - name : Install environment
30
24
run : |
31
- bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
32
- - name : Install composer
33
- run : composer install --prefer-dist --no-progress --no-suggest
34
- - name : Run phpunit
35
- run : phpunit
25
+ npm run wp-env start
26
+ - name : Prepare Database
27
+ run : bash ./bin/e2e-after-setup.sh
28
+ - name : Run the tests
29
+ run : |
30
+ npm run test:unit:php
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.BOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments