-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(*): Add compatibility with 6.3 (#144)
* tests(6.3): Add 6.3 in tests matrix * test(*): Update database after install to avaoi database update required message * tests(*): Fix version not as expected and database update required message error * ci(*): Update missing action * test(multisite): Fix multi notice * feat(*): Prepare release 2.5.1
- Loading branch information
1 parent
1a3768a
commit 41b9d19
Showing
14 changed files
with
120 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "5.9", "6.0", "6.1", "6.2" ] | ||
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.1", "6.2","6.3" ] | ||
php-version: [ "7.2", "7.4", "8.0" ] | ||
exclude: | ||
- { php-version: "7.4", wp-version: "4.9" } | ||
|
@@ -48,7 +48,7 @@ jobs: | |
sudo apt-get -q update | ||
sudo apt-get -q -y install libnss3-tools ddev | ||
mkcert -install | ||
ddev config global --instrumentation-opt-in=false --omit-containers=dba,ddev-ssh-agent | ||
ddev config global --instrumentation-opt-in=false --omit-containers=ddev-ssh-agent | ||
- name: Set WP_VERSION_CODE env | ||
|
@@ -60,6 +60,12 @@ jobs: | |
- name: Create empty WordPress DDEV project (with Nginx) | ||
run: ddev config --project-type=wordpress --project-name=${{ env.WP_VERSION_CODE }} --php-version=${{ matrix.php-version }} --webserver-type=nginx-fpm | ||
|
||
- name: Disable automatic update | ||
run: | | ||
# @see https://wordpress.org/documentation/article/configuring-automatic-background-updates/#constant-to-disable-all-updates | ||
sed -i -e 's/#ddev-generated//g' wp-config-ddev.php | ||
echo "define( 'AUTOMATIC_UPDATER_DISABLED', true );" >> wp-config-ddev.php | ||
- name: Add Redis, Memcached, Crowdsec and Playwright | ||
run: | | ||
ddev get ddev/ddev-redis | ||
|
@@ -77,7 +83,7 @@ jobs: | |
|
||
- name: Setup WordPress ${{ matrix.wp-version }} with PHP ${{ matrix.php-version }} | ||
run: | | ||
ddev exec wp core install --url='https://${{ env.WP_VERSION_CODE }}.ddev.site' --title='WordPress' --admin_user='admin' --admin_password='admin123' --admin_email='[email protected]' | ||
ddev wp core install --url='https://${{ env.WP_VERSION_CODE }}.ddev.site' --title='WordPress' --admin_user='admin' --admin_password='admin123' --admin_email='[email protected]' | ||
- name: Clone ${{ env.EXTENSION_NAME }} files | ||
uses: actions/checkout@v3 | ||
|
@@ -109,11 +115,8 @@ jobs: | |
ddev exec php -v | ||
ddev exec -s crowdsec crowdsec -version | ||
- name: Run Plugin activation tests | ||
uses: ./wp-content/plugins/crowdsec/.github/workflows/end-to-end/run-single-test | ||
with: | ||
test_path: ${{ github.workspace }}/${{ env.EXTENSION_PATH }}/tests/e2e-ddev | ||
file_path: 1-activate-plugin.js | ||
- name: Activate plugin with wp | ||
run: ddev wp plugin install crowdsec --activate | ||
|
||
- name: Configure CrowdSec and Wordpress bouncer plugin | ||
run: | | ||
|
@@ -183,4 +186,17 @@ jobs: | |
uses: ./wp-content/plugins/crowdsec/.github/workflows/end-to-end/run-single-test | ||
with: | ||
test_path: ${{ github.workspace }}/${{ env.EXTENSION_PATH }}/tests/e2e-ddev | ||
file_path: 8-geolocation.js | ||
file_path: 8-geolocation.js | ||
|
||
- name: Check tested version | ||
run: | | ||
CURRENT_VERSION=$(ddev wp core version) | ||
if [[ ${{ matrix.wp-version }} == $CURRENT_VERSION ]] | ||
then | ||
echo "Tested version was as expected" | ||
else | ||
echo "Tested version was not as expected" | ||
echo $CURRENT_VERSION | ||
echo ${{ matrix.wp-version }} | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.1", "6.2" ] | ||
wp-version: [ "4.9", "5.0", "5.2", "5.4", "5.6", "5.8", "6.0", "6.1", "6.2", "6.3" ] | ||
php-version: [ "7.2", "7.4", "8.0" ] | ||
exclude: | ||
- { php-version: "7.4", wp-version: "4.9" } | ||
|
@@ -48,7 +48,7 @@ jobs: | |
sudo apt-get -q update | ||
sudo apt-get -q -y install libnss3-tools ddev | ||
mkcert -install | ||
ddev config global --instrumentation-opt-in=false --omit-containers=dba,ddev-ssh-agent | ||
ddev config global --instrumentation-opt-in=false --omit-containers=ddev-ssh-agent | ||
- name: Set WP_VERSION_CODE env | ||
|
@@ -60,6 +60,12 @@ jobs: | |
- name: Create empty WordPress DDEV project (with Apache) | ||
run: ddev config --project-type=wordpress --project-name=${{ env.WP_VERSION_CODE }} --php-version=${{ matrix.php-version }} --webserver-type=apache-fpm | ||
|
||
- name: Disable automatic update | ||
run: | | ||
# @see https://wordpress.org/documentation/article/configuring-automatic-background-updates/#constant-to-disable-all-updates | ||
sed -i -e 's/#ddev-generated//g' wp-config-ddev.php | ||
echo "define( 'AUTOMATIC_UPDATER_DISABLED', true );" >> wp-config-ddev.php | ||
- name: Add Redis, Memcached, Crowdsec and Playwright | ||
run: | | ||
ddev get ddev/ddev-redis | ||
|
@@ -77,7 +83,7 @@ jobs: | |
|
||
- name: Setup WordPress ${{ matrix.wp-version }} with PHP ${{ matrix.php-version }} | ||
run: | | ||
ddev exec wp core install --url='https://${{ env.WP_VERSION_CODE }}.ddev.site' --title='WordPress' --admin_user='admin' --admin_password='admin123' --admin_email='[email protected]' | ||
ddev wp core install --url='https://${{ env.WP_VERSION_CODE }}.ddev.site' --title='WordPress' --admin_user='admin' --admin_password='admin123' --admin_email='[email protected]' | ||
- name: Clone ${{ env.EXTENSION_NAME }} files | ||
uses: actions/checkout@v3 | ||
|
@@ -109,6 +115,7 @@ jobs: | |
ddev exec php -v | ||
ddev exec -s crowdsec crowdsec -version | ||
- name: Run Plugin activation tests | ||
uses: ./wp-content/plugins/crowdsec/.github/workflows/end-to-end/run-single-test | ||
with: | ||
|
@@ -163,4 +170,18 @@ jobs: | |
uses: ./wp-content/plugins/crowdsec/.github/workflows/end-to-end/run-single-test | ||
with: | ||
test_path: ${{ github.workspace }}/${{ env.EXTENSION_PATH }}/tests/e2e-ddev | ||
file_path: 8-geolocation.js | ||
file_path: 8-geolocation.js | ||
|
||
- name: Check tested version | ||
run: | | ||
CURRENT_VERSION=$(ddev wp core version) | ||
if [[ ${{ matrix.wp-version }} == $CURRENT_VERSION ]] | ||
then | ||
echo "Tested version was as expected" | ||
else | ||
echo "Tested version was not as expected" | ||
echo $CURRENT_VERSION | ||
echo ${{ matrix.wp-version }} | ||
exit 1 | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters