Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/doc-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
gem install awesome_bot
cd extension
awesome_bot --files README.md --allow-dupe --allow 401 --skip-save-results --white-list ddev.site --base-url http://localhost:8080/
awesome_bot docs/*.md --skip-save-results --allow-dupe --allow 401 --white-list ddev.site,your-wordpress-url,crowdsec:8080 --base-url http://localhost:8080/docs/
awesome_bot docs/*.md --skip-save-results --allow-dupe --allow 401 --white-list ddev.site,your-wordpress-url,crowdsec:8080,localhost:7422 --base-url http://localhost:8080/docs/
18 changes: 18 additions & 0 deletions .github/workflows/end-to-end-auto-prepend-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jobs:

- name: Prepare for playwright test
run: |
ddev exec -s crowdsec apk add iproute2
cat .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/html/appsec-post.html | ddev wp post create --post_type=page --post_status=publish --post_title="AppSec" -
ddev wp rewrite structure "/%postname%/"
mkdir -p crowdsec/tls
mkdir -p crowdsec/geolocation
cp .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/php/cache-actions-with-wordpress-load.php cache-actions.php
Expand Down Expand Up @@ -197,6 +200,21 @@ jobs:
test_path: ${{ github.workspace }}/${{ env.EXTENSION_PATH }}/tests/e2e-ddev
file_path: 8-geolocation.js

- name: Run AppSec 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: 11-appsec.js

- name: Prepare CrowdSec for AppSec timeout tests
run: ddev exec -s crowdsec tc qdisc add dev eth0 root netem delay 500ms

- name: Run AppSec timeout 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: 12-appsec-timeout.js

- name: Check tested version
run: |
CURRENT_VERSION=$(ddev wp core version)
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/end-to-end-multisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ jobs:

- name: Prepare for playwright test
run: |
ddev exec -s crowdsec apk add iproute2
cat .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/html/appsec-post.html | ddev wp post create --url='https://${{ env.WP_VERSION_CODE }}.ddev.site/site1' --post_type=page --post_status=publish --post_title="AppSec" -
cat .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/html/appsec-post.html | ddev wp post create --url='https://${{ env.WP_VERSION_CODE }}.ddev.site/site2' --post_type=page --post_status=publish --post_title="AppSec" -
ddev wp rewrite structure "/%postname%/" --url='https://${{ env.WP_VERSION_CODE }}.ddev.site/site1'
ddev wp rewrite structure "/%postname%/" --url='https://${{ env.WP_VERSION_CODE }}.ddev.site/site2'
mkdir -p crowdsec/tls
mkdir -p crowdsec/geolocation
cp .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/php/cache-actions-with-wordpress-load.php cache-actions.php
Expand Down Expand Up @@ -195,6 +200,23 @@ jobs:
file_path: 8-geolocation.js
subsite: ${{ matrix.subsite }}

- name: Run AppSec 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: 11-appsec.js
subsite: ${{ matrix.subsite }}

- name: Prepare CrowdSec for AppSec timeout tests
run: ddev exec -s crowdsec tc qdisc add dev eth0 root netem delay 500ms

- name: Run AppSec timeout 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: 12-appsec-timeout.js
subsite: ${{ matrix.subsite }}

- name: Check tested version
run: |
CURRENT_VERSION=$(ddev wp core version)
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/end-to-end-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
paths-ignore:
- '**.md'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: Debug with tmate
default: false
schedule:
- cron: '15 3 * * 4'

Expand Down Expand Up @@ -36,8 +41,6 @@ jobs:
php-version: '8.0'
- wp-version: '6.6'
php-version: '7.2'
- wp-version: '6.6'
php-version: '8.0'
- wp-version: '6.6'
php-version: '8.3'

Expand Down Expand Up @@ -109,6 +112,9 @@ jobs:

- name: Prepare for playwright test
run: |
ddev exec -s crowdsec apk add iproute2
cat .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/html/appsec-post.html | ddev wp post create --post_type=page --post_status=publish --post_title="AppSec" -
ddev wp rewrite structure "/%postname%/"
mkdir -p crowdsec/tls
mkdir -p crowdsec/geolocation
cp .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/php/cache-actions-with-wordpress-load.php cache-actions.php
Expand Down Expand Up @@ -189,6 +195,22 @@ jobs:
test_path: ${{ github.workspace }}/${{ env.EXTENSION_PATH }}/tests/e2e-ddev
file_path: 8-geolocation.js

- name: Run AppSec 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: 11-appsec.js


- name: Prepare CrowdSec for AppSec timeout tests
run: ddev exec -s crowdsec tc qdisc add dev eth0 root netem delay 500ms

- name: Run AppSec timeout 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: 12-appsec-timeout.js

- name: Check tested version
run: |
CURRENT_VERSION=$(ddev wp core version)
Expand All @@ -201,4 +223,12 @@ jobs:
echo ${{ matrix.wp-version }}
exit 1
fi
- name: tmate debugging session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
github-token: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
if: failure() && github.event.inputs.debug_enabled == 'true'

9 changes: 9 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ jobs:

- name: Prepare for playwright test
run: |
ddev exec -s crowdsec apk add iproute2
cat .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/html/appsec-post.html | ddev wp post create --post_type=page --post_status=publish --post_title="AppSec" -
ddev wp rewrite structure "/%postname%/"
mkdir -p crowdsec/tls
mkdir -p crowdsec/geolocation
cp .ddev/okaeli-add-on/wordpress/custom_files/crowdsec/php/cache-actions-with-wordpress-load.php cache-actions.php
Expand Down Expand Up @@ -211,6 +214,12 @@ jobs:
test_path: ${{ github.workspace }}/${{ env.EXTENSION_PATH }}/tests/e2e-ddev
file_path: 8-geolocation.js

- name: Run AppSec 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: 11-appsec.js

- name: tmate debugging session
uses: mxschmitt/action-tmate@v3
with:
Expand Down
Loading