Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Setup E2E tests on CI #126

Merged
merged 5 commits into from
Aug 31, 2021
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
29 changes: 29 additions & 0 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
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:
Expand All @@ -22,6 +25,15 @@ jobs:
sudo apt install xcaddy
- 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
build-tyk-validator:
name: Check that Souin build as Tyk middleware
runs-on: ubuntu-latest
Expand All @@ -46,10 +58,20 @@ jobs:
expected: '[INFO] Olric bindAddr'
actual: ${{ env.TYK_DC_RESULT }}
comparison: contains
- name: Run Tyk E2E tests
uses: anthonyvscode/newman-action@v1
with:
collection: "docs/e2e/Souin E2E.postman_collection.json"
folder: Tyk
reporters: cli
delayRequest: 5000
build-traefik-validator:
name: Check that Souin build as Træfik plugin
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:
Expand Down Expand Up @@ -78,3 +100,10 @@ jobs:
expected: '"middlewares\":{\"souin\":{\"plugin\":{\"souin-plugin'
actual: ${{ env.TRAEFIK_MIDDLEWARE_RESULT }}
comparison: contains
- name: Run Træfik E2E tests
uses: anthonyvscode/newman-action@v1
with:
collection: "docs/e2e/Souin E2E.postman_collection.json"
folder: Traefik
reporters: cli
delayRequest: 5000
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ validate: lint tests down health-check-prod ## Run lint, tests and ensure prod c
vendor-plugins: ## Generate and prepare vendors for each plugin
cd plugins/tyk && $(MAKE) vendor
cd plugins/traefik && $(MAKE) vendor
cd plugins/caddy && go mod tidy && go mod download
Loading