-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(providers): Search by prefix and regexp in NutsDB (#224)
* fix(providers): Search by prefix and regexp in NutsDB * Increase nutsdb limit * Fix tests * Replace fmt to logger * Automatically generate workflow * Add Surrogate-Key purge/store debug messages * Support Træfik v2.7+ * Bump version
- Loading branch information
Showing
137 changed files
with
3,975 additions
and
2,462 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/bin/bash | ||
|
||
plugins=("beego" "chi" "dotweb" "echo" "fiber" "gin" "go-zero" "goyave" "skipper" "souin" "traefik" "tyk" "webgo") | ||
durations=("35" "30" "30" "30" "45" "30" "50" "35" "50" "40" "30" "30" "30") | ||
versions=("16" "16" "16" "16" "16" "16" "16" "16" "18" "16" "16" "16" "16") | ||
|
||
IFS= read -r -d '' tpl <<EOF | ||
name: Build and validate Souin as plugins | ||
on: | ||
- pull_request | ||
jobs: | ||
build-caddy-validator: | ||
name: Check that Souin build as caddy module | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Add domain.com host to /etc/hosts | ||
run: | | ||
sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts | ||
- | ||
name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v2 | ||
- | ||
name: Install xcaddy | ||
run: go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest | ||
- | ||
name: Build Souin as caddy module | ||
run: cd plugins/caddy && xcaddy build --with github.com/darkweak/souin/plugins/caddy=./ --with github.com/darkweak/souin@latest=../.. | ||
- | ||
name: Run detached caddy | ||
run: cd plugins/caddy && ./caddy run & | ||
- | ||
name: Run Caddy E2E tests | ||
uses: anthonyvscode/newman-action@v1 | ||
with: | ||
collection: "docs/e2e/Souin E2E.postman_collection.json" | ||
folder: Caddy | ||
reporters: cli | ||
delayRequest: 5000 | ||
EOF | ||
workflow+="$tpl" | ||
|
||
for i in ${!plugins[@]}; do | ||
lower="${plugins[$i]}" | ||
capitalized="$(tr '[:lower:]' '[:upper:]' <<< ${lower:0:1})${lower:1}" | ||
IFS= read -d '' tpl <<EOF | ||
build-$lower-validator: | ||
name: Check that Souin build as $capitalized middleware | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Add domain.com host to /etc/hosts | ||
run: | | ||
sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts | ||
- | ||
name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.${versions[$i]} | ||
- | ||
name: Checkout code | ||
uses: actions/checkout@v2 | ||
- | ||
name: Build Souin as $capitalized plugin | ||
run: make build-and-run-$lower | ||
- | ||
name: Wait for Souin is really loaded inside $capitalized as middleware | ||
uses: jakejarvis/wait-action@master | ||
with: | ||
time: ${durations[$i]}s | ||
- | ||
name: Set $capitalized logs configuration result as environment variable | ||
run: cd plugins/$lower && echo "\$(make load-checker)" >> \$GITHUB_ENV | ||
- | ||
name: Check if the configuration is loaded to define if Souin is loaded too | ||
uses: nick-invision/assert-action@v1 | ||
with: | ||
expected: '"Souin configuration is now loaded."' | ||
actual: \${{ env.MIDDLEWARE_RESULT }} | ||
comparison: contains | ||
- | ||
name: Run $capitalized E2E tests | ||
uses: anthonyvscode/newman-action@v1 | ||
with: | ||
collection: "docs/e2e/Souin E2E.postman_collection.json" | ||
folder: $capitalized | ||
reporters: cli | ||
delayRequest: 5000 | ||
EOF | ||
workflow+="$tpl" | ||
done | ||
echo "${workflow%$'\n'}" > "$( dirname -- "$0"; )/plugins.yml" |
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
Oops, something went wrong.