File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 20
20
steps :
21
21
# Checkout the repository
22
22
- name : Checkout
23
- uses : actions/checkout@v3
23
+ uses : actions/checkout@v4
24
24
25
25
# PHP setup
26
26
- name : Setup PHP ${{ matrix.php }}
@@ -37,22 +37,22 @@ jobs:
37
37
38
38
# Use node version from .nvmrc
39
39
- name : Setup NodeJS
40
- uses : actions/setup-node@v3
40
+ uses : actions/setup-node@v4
41
41
with :
42
42
node-version-file : ' .nvmrc'
43
43
44
44
# Cache composer dependencies
45
45
- name : Cache composer dependencies
46
46
id : composer-cache
47
- uses : actions/cache@v3
47
+ uses : actions/cache@v1
48
48
with :
49
49
path : ./vendor
50
50
key : ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }}
51
51
52
52
# Cache node dependencies
53
53
- name : Cache node dependencies
54
54
id : node-cache
55
- uses : actions/cache@v3
55
+ uses : actions/cache@v4
56
56
with :
57
57
path : ./node_modules
58
58
key : ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
76
76
# Prepare test environment
77
77
- name : Prepare test environment
78
78
run : |
79
- bash tests/bin/install-phpunit-tests-dependencies.sh wc_apa_test root root 127.0.0.1 latest
79
+ bash tests/bin/install-phpunit-tests-dependencies.sh wc_apa_test root root 127.0.0.1 latest ${{ matrix.php }}
80
80
81
81
# Run tests
82
82
- name : Run tests
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ DB_USER=$2
11
11
DB_PASS=$3
12
12
DB_HOST=${4-localhost}
13
13
WP_VERSION=${5-latest}
14
+ PHP_VERSION=$6
14
15
15
16
TMPDIR=${TMPDIR-/ tmp}
16
17
TMPDIR=$( echo $TMPDIR | sed -e " s/\/$//" )
@@ -62,9 +63,14 @@ install_wp() {
62
63
}
63
64
64
65
install_woocommerce () {
65
- WC_VERSION=$( curl https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r ' .version' )
66
+ if [ $PHP_VERSION = " 7.3" ]; then
67
+ WC_VERSION=" 8.4.0"
68
+ echo " Warning: WooCommerce $WC_VERSION is the latest version compatible with PHP7.3"
69
+ else
70
+ WC_VERSION=$( curl https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r ' .version' )
71
+ fi
66
72
67
- echo " Installing WooCommerce $WC_VERSION "
73
+ echo " Installing WooCommerce $WC_VERSION on PHP $PHP_VERSION "
68
74
cd -
69
75
download https://downloads.wordpress.org/plugin/woocommerce.$WC_VERSION .zip ../woocommerce.zip
70
76
unzip -o -qq ../woocommerce.zip -d ../
You can’t perform that action at this time.
0 commit comments