-
Notifications
You must be signed in to change notification settings - Fork 7
87 lines (73 loc) · 2.22 KB
/
integrations.yml
File metadata and controls
87 lines (73 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Integration Tests
on:
push:
branches:
- develop
- main
paths:
- '**.php'
- 'composer.json'
- 'phpunit.xml.dist'
- '.wp-env.json'
- '.github/workflows/integrations.yml'
pull_request:
branches:
- develop
- main
paths:
- '**.php'
- 'composer.json'
- 'phpunit.xml.dist'
- '.wp-env.json'
- '.github/workflows/integrations.yml'
workflow_dispatch:
# Cancel previous runs of this workflow if a new one is triggered.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
integration-tests:
name: WP ${{ matrix.wordpress }} on PHP ${{ matrix.php }}${{ matrix.multisite && ' (MS)' || '' }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
# Check lowest supported WP version, with the lowest supported PHP.
- wordpress: '6.4'
php: '8.1'
# Check latest WP with the latest PHP.
- wordpress: 'master'
php: 'latest'
env:
WP_ENV_CORE: WordPress/WordPress#${{ matrix.wordpress }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v4.4.0
with:
node-version: 20
cache: npm
- name: Install Node.js dependencies
run: npm ci
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.34.0
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
- name: Start wp-env
run: npm run wp-env start
- name: Run integration tests (single site)
if: ${{ ! matrix.multisite }}
run: composer test:integration
- name: Run integration tests (multisite)
if: ${{ matrix.multisite }}
run: composer test:integration-ms