|
5 | 5 | branches: |
6 | 6 | - main |
7 | 7 | pull_request: |
8 | | - schedule: |
9 | | - - cron: '0 0 * * *' |
10 | 8 |
|
11 | 9 | jobs: |
12 | 10 | tests: |
13 | | - name: "WP: ${{ matrix.wp_version }} - PHP: ${{ matrix.php }} - (MU: ${{ matrix.multisite }})" |
14 | | - runs-on: ubuntu-latest |
| 11 | + name: "WP: ${{ matrix.wp_version }} - PHP: ${{ matrix.php }}" |
15 | 12 | strategy: |
16 | | - fail-fast: false # do not fail fast, let all the failing tests fail. |
| 13 | + fail-fast: false |
17 | 14 | matrix: |
18 | 15 | php: [8.0, 8.1, 8.2, 8.3] |
19 | | - multisite: [0, 1] |
20 | | - wp_version: ['5.9', 'latest'] |
21 | | - env: |
22 | | - WP_CORE_DIR: /tmp/wordpress/ |
23 | | - WP_TESTS_DIR: /tmp/wordpress-tests-lib |
24 | | - WP_VERSION: ${{ matrix.wp_version }} |
25 | | - WP_MULTISITE: ${{ matrix.multisite }} |
26 | | - services: |
27 | | - mysql: |
28 | | - image: mysql:8.0 |
29 | | - env: |
30 | | - MYSQL_ALLOW_EMPTY_PASSWORD: yes |
31 | | - ports: |
32 | | - - 3306:3306 |
33 | | - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 |
34 | | - steps: |
35 | | - - name: Cancel previous runs of this workflow (pull requests only) |
36 | | - if: ${{ github.event_name == 'pull_request' }} |
37 | | - |
38 | | - with: |
39 | | - access_token: ${{ github.token }} |
40 | | - |
41 | | - - name: Check out code |
42 | | - uses: actions/checkout@v4 |
43 | | - |
44 | | - - name: Set up PHP |
45 | | - uses: shivammathur/setup-php@v2 |
46 | | - with: |
47 | | - php-version: ${{ matrix.php }} |
48 | | - tools: composer:v2 |
49 | | - coverage: none |
50 | | - |
51 | | - - name: Set up WordPress and Plugin |
52 | | - run: | |
53 | | - bash <(curl -s "https://raw.githubusercontent.com/wp-cli/sample-plugin/master/bin/install-wp-tests.sh") wordpress_unit_tests root '' 127.0.0.1 ${{ matrix.wp_version }} |
54 | | - rm -rf "${WP_CORE_DIR}wp-content/plugins" |
55 | | - mkdir -p "${WP_CORE_DIR}wp-content/plugins/wp-graphql-buddypress" |
56 | | - rsync -a --exclude=.git . "${WP_CORE_DIR}wp-content/plugins/wp-graphql-buddypress" |
57 | | - cd ${WP_CORE_DIR}wp-content/plugins/wp-graphql-buddypress && composer install |
58 | | -
|
59 | | - - name: Run all tests |
60 | | - run: | |
61 | | - cd ${WP_CORE_DIR}wp-content/plugins/wp-graphql-buddypress |
62 | | - composer phpunit |
| 16 | + multisite: [true, false] |
| 17 | + wp_version: ['6.1', 'latest'] |
| 18 | + uses: alleyinteractive/.github/.github/workflows/php-tests.yml@feature/php-tests-core-suite |
| 19 | + with: |
| 20 | + multisite: ${{ matrix.multisite }} |
| 21 | + php: ${{ matrix.php }} |
| 22 | + wordpress: ${{ matrix.wp_version }} |
| 23 | + object-cache: ${{ matrix.object }} |
| 24 | + test-suite: 'core-test-suite' |
| 25 | + package-directory: 'plugins/wp-graphql-buddypress' |
0 commit comments