forked from grafana/grafonnet-lib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request grafana#231 from grafana/e2e-docker
Run E2E Tests with Docker Compose
- Loading branch information
Showing
11 changed files
with
1,801 additions
and
1,429 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
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,18 @@ | ||
ARG CYPRESS_IMAGE | ||
|
||
FROM $CYPRESS_IMAGE | ||
WORKDIR /e2e | ||
|
||
# dependencies will be installed only if the package files change | ||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
# by setting CI environment variable we switch the Cypress install messages | ||
# to small "started / finished" and avoid 1000s of lines of progress messages | ||
# https://github.com/cypress-io/cypress/issues/1243 | ||
ENV CI=1 | ||
RUN npm ci | ||
# verify that Cypress has been installed correctly. | ||
# running this command separately from "cypress run" will also cache its result | ||
# to avoid verifying again when running the tests | ||
RUN npx cypress verify |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
{ | ||
"baseUrl": "http://admin:admin@localhost:3030" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: '3' | ||
services: | ||
grafana: | ||
image: grafana/grafana:${GRAFANA_VERSION?err} | ||
ports: | ||
- "3030:3000" | ||
e2e: | ||
build: | ||
context: . | ||
args: | ||
CYPRESS_IMAGE: cypress/included:4.7.0 | ||
image: grafonnet-e2e-dev | ||
entrypoint: cypress open --project . | ||
depends_on: | ||
- grafana | ||
environment: | ||
- CYPRESS_baseUrl=http://grafana:3000 | ||
- CYPRESS_video=false | ||
- DISPLAY=${DISPLAY?err} | ||
volumes: | ||
- ./cypress:/e2e/cypress | ||
- ./cypress.json:/e2e/cypress.json | ||
- ../tests:/e2e/tests | ||
- /tmp/.X11-unix:/tmp/.X11-unix |
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,20 @@ | ||
version: '3' | ||
services: | ||
grafana: | ||
image: grafana/grafana:${GRAFANA_VERSION?err} | ||
e2e: | ||
build: | ||
context: . | ||
args: | ||
CYPRESS_IMAGE: cypress/base:12 | ||
image: grafonnet-e2e | ||
command: npx cypress run | ||
depends_on: | ||
- grafana | ||
environment: | ||
- CYPRESS_baseUrl=http://grafana:3000 | ||
- CYPRESS_video=false | ||
volumes: | ||
- ./cypress:/e2e/cypress | ||
- ./cypress.json:/e2e/cypress.json | ||
- ../tests:/e2e/tests |
Oops, something went wrong.