File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run Unit Tests
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ wp_version :
7+ required : true
8+ type : string
9+ wc_version :
10+ required : true
11+ type : string
12+
13+ jobs :
14+ php-tests :
15+ name : PHP unit tests - PHP ${{ matrix.php }}, WP ${{ matrix.wp-version }}
16+ runs-on : ubuntu-latest
17+ env :
18+ WP_CORE_DIR : " /tmp/wordpress/src"
19+ WP_TESTS_DIR : " /tmp/wordpress/tests/phpunit"
20+ strategy :
21+ matrix :
22+ php : [7.4, 8.3]
23+ wp-version : [latest]
24+ steps :
25+ - uses : actions/checkout@v4
26+
27+ - name : Prepare PHP
28+ uses : woocommerce/grow/prepare-php@actions-v1
29+ with :
30+ php-version : " ${{ matrix.php }}"
31+
32+ - name : Prepare MySQL
33+ uses : woocommerce/grow/prepare-mysql@actions-v1
34+
35+ - name : Install WP tests
36+ shell : bash
37+ run : ./bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wp-version }}
38+
39+ - name : Run PHP unit tests
40+ run : composer test-unit
You can’t perform that action at this time.
0 commit comments