Skip to content

Commit bfd27d5

Browse files
committed
update dev-dependencies and ci environment
1 parent 9d1934a commit bfd27d5

File tree

7 files changed

+61
-16
lines changed

7 files changed

+61
-16
lines changed

.drone.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ steps:
1414
depends_on:
1515
- composer-install
1616
- name: node-install
17-
image: node:18
17+
image: node:22
1818
commands:
1919
- npm install
2020
- name: lint-assets
21-
image: node:20
21+
image: node:22
2222
commands:
2323
- npx eslint scripts/block.js
2424
- npx eslint scripts/liveticker.js
2525
- npx stylelint styles/block.css
2626
- npx stylelint styles/liveticker.css
2727
depends_on:
2828
- node-install
29-

.github/workflows/test.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,34 @@ jobs:
77
matrix:
88
include:
99
- php: '8.3'
10-
wordpress: '6.4'
10+
wordpress: '6.6'
1111
- php: '8.2'
12-
wordpress: '6.3'
12+
wordpress: '6.4'
1313
- php: '8.1'
14-
wordpress: '6.1'
14+
wordpress: '6.2'
1515
- php: '8.0'
16+
wordpress: '6.0'
17+
- php: '7.4'
1618
wordpress: '5.9'
1719
- php: '5.6'
1820
wordpress: '4.7'
1921
steps:
2022
- name: Checkout
2123
uses: actions/checkout@v4
24+
- name: Install SVN
25+
run: |
26+
if ! command -v svn > /dev/null; then
27+
sudo apt-get update
28+
sudo apt-get install -y subversion
29+
fi
2230
- name: Setup PHP
2331
uses: shivammathur/setup-php@v2
2432
with:
2533
php-version: ${{ matrix.php }}
34+
coverage: xdebug
2635
tools: composer
2736
- name: Setup DB
28-
run: sudo /etc/init.d/mysql start
37+
run: sudo sudo systemctl start mysql.service
2938
- name: Setup WP
3039
run: bash bin/install-wp-tests.sh wordpress root root localhost "${{ matrix.wordpress }}"
3140
- name: Install
@@ -44,9 +53,9 @@ jobs:
4453
php-version: '8.2'
4554
tools: composer
4655
- name: Setup Node
47-
uses: actions/setup-node@v3
56+
uses: actions/setup-node@v4
4857
with:
49-
node-version: '20'
58+
node-version: '22'
5059
- name: Install
5160
run: |
5261
composer install --no-interaction
@@ -65,7 +74,8 @@ jobs:
6574
with:
6675
fetch-depth: 0
6776
- name: Analyze with SonarCloud
68-
uses: sonarsource/sonarcloud-github-action@master
77+
if: env.SONAR_TOKEN != ''
78+
uses: sonarsource/sonarcloud-github-action@v3
6979
env:
7080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7181
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/wordpress-plugin-asset-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup PHP
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: '8.0'
16+
php-version: '8.2'
1717
tools: composer
1818
- name: Install
1919
run: composer install --no-interaction
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Plugin check
2+
on:
3+
push:
4+
branches: [ 'stable', 'release/*' ]
5+
pull_request:
6+
branches: [ 'stable' ]
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Package plugin
15+
run: |
16+
mkdir -p ./dist
17+
tail -n +7 README.md > README.md.tmp && mv README.md.tmp README.md
18+
rsync -rc --exclude-from=.distignore ./ ./dist/stklcode-liveticker --delete --delete-excluded
19+
20+
- name: Check WP plugin
21+
uses: wordpress/plugin-check-action@v1
22+
with:
23+
build-dir: ./dist/stklcode-liveticker

.github/workflows/wordpress-plugin-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup PHP
1515
uses: shivammathur/setup-php@v2
1616
with:
17-
php-version: '7.4'
17+
php-version: '8.2'
1818
tools: composer
1919
- name: Install
2020
run: composer install --no-interaction

bin/install-wp-tests.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ download() {
2222
curl -s "$1" > "$2";
2323
elif [ `which wget` ]; then
2424
wget -nv -O "$2" "$1"
25+
else
26+
echo "Error: Neither curl nor wget is installed."
27+
exit 1
28+
fi
29+
}
30+
31+
# Check if svn is installed
32+
check_svn_installed() {
33+
if ! command -v svn > /dev/null; then
34+
echo "Error: svn is not installed. Please install svn and try again."
35+
exit 1
2536
fi
2637
}
2738

@@ -64,6 +75,7 @@ install_wp() {
6475
if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
6576
mkdir -p $TMPDIR/wordpress-trunk
6677
rm -rf $TMPDIR/wordpress-trunk/*
78+
check_svn_installed
6779
svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR/wordpress-trunk/wordpress
6880
mv $TMPDIR/wordpress-trunk/wordpress/* $WP_CORE_DIR
6981
else
@@ -92,7 +104,7 @@ install_wp() {
92104
tar --strip-components=1 -zxmf $TMPDIR/wordpress.tar.gz -C $WP_CORE_DIR
93105
fi
94106

95-
download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
107+
download https://raw.githubusercontent.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
96108
}
97109

98110
install_test_suite() {
@@ -108,6 +120,7 @@ install_test_suite() {
108120
# set up testing suite
109121
mkdir -p $WP_TESTS_DIR
110122
rm -rf $WP_TESTS_DIR/{includes,data}
123+
check_svn_installed
111124
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
112125
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
113126
fi

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"author": "Stefan Kalscheuer",
66
"license": "GPL-2.0+",
77
"devDependencies": {
8-
"@wordpress/eslint-plugin": "^17",
9-
"@wordpress/stylelint-config": "^21",
8+
"@wordpress/eslint-plugin": "^22",
9+
"@wordpress/stylelint-config": "^23",
1010
"eslint": "^8",
11-
"stylelint": "^14"
11+
"stylelint": "^16"
1212
}
1313
}

0 commit comments

Comments
 (0)