-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run cypress against an instance with baseURL
- Loading branch information
Showing
5 changed files
with
79 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Cypress BaseURL Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
cypress-base-url-tests: | ||
runs-on: ubuntu-latest | ||
container: cypress/included:8.6.0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.17.0' | ||
- name: run nginx with /pyroscope | ||
run: docker-compose -f cypress/base-url/base-url-docker-compose.yml up -d | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
build: make e2e-build | ||
wait-on: http://localhost:8080/pyroscope | ||
start: make server | ||
config-file: cypress/base-url/cypress.json | ||
env: | ||
# keep the server quiet | ||
PYROSCOPE_BASE_URL: 'http://localhost:8080/pyroscope' | ||
PYROSCOPE_LOG_LEVEL: error | ||
ENABLED_SPIES: none | ||
CYPRESS_VIDEO: true | ||
CYPRESS_COMPARE_SNAPSHOTS: true | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: cypress-screenshots | ||
path: cypress/screenshots | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: cypress-videos | ||
path: cypress/videos | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: cypress-snapshots | ||
path: cypress/snapshots |
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,7 @@ | ||
version: '3' | ||
services: | ||
nginx: | ||
image: nginx | ||
network_mode: host | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf |
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,8 @@ | ||
{ | ||
"video": false, | ||
"baseUrl": "http://localhost:8080/pyroscope/", | ||
"integrationFolder": "cypress/integration/webapp", | ||
"retries": { | ||
"runMode": 5 | ||
} | ||
} |
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,12 @@ | ||
events {} | ||
http { | ||
server { | ||
listen 8080; | ||
|
||
location /pyroscope/ { | ||
rewrite /pyroscope(.*) $1 break; | ||
proxy_pass http://localhost:4040; | ||
} | ||
} | ||
} | ||
|
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