You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+16-5
Original file line number
Diff line number
Diff line change
@@ -380,11 +380,22 @@ If you're curious how we manage all of these tests in CI check out our [`circle.
380
380
381
381
#### Docker
382
382
383
-
Sometimes tests pass locally, but fail on CI. Our CI environment should be dockerized. In order to run the same image locally, there is script [scripts/run-docker-local.sh](scripts/run-docker-local.sh) that assumes that you have pulled the image `cypress/internal:chrome61` (see [circle.yml](circle.yml) for the current image name).
383
+
Sometimes tests pass locally, but fail in CI. Our CI environment is dockerized. In order to run the image used in CI locally:
384
+
385
+
1.[Install Docker](https://docs.docker.com/install/) and get it running on your machine.
386
+
2. Run the following command from the root of the project:
387
+
388
+
```shell
389
+
npm run docker
390
+
```
391
+
392
+
There is a script [scripts/run-docker-local.sh](scripts/run-docker-local.sh) that runs the cypress image (see [circle.yml](circle.yml) for the current image name).
384
393
385
394
The image will start and will map the root of the repository to `/cypress` inside the image. Now you can modify the files using your favorite environment and rerun tests inside the docker environment.
386
395
387
-
**hint** sometimes building inside the image has problems with `node-sass` library.
396
+
##### Troubleshooting
397
+
398
+
Sometimes building inside the image has problems with `node-sass` library.
You can also use Docker to simulate and debug built binary. In a temp folder (for example from the folder `/tmp/test-folder/`) start a Docker image
421
+
You can also use Docker to simulate and debug the built binary. In a temporary folder (for example from the folder `/tmp/test-folder/`) start a Docker image:
411
422
412
423
```shell
413
424
$ docker run -it -w /app -v $PWD:/app cypress/base:8 /bin/bash
414
425
```
415
426
416
-
Point installation at a specific binary and NPM (if needed) and _set local cache folder_ to unzip downloaded binary into a subfolder.
427
+
Point the installation at a specific binary and npm (if needed) and _set local cache folder_ to unzip the downloaded binary into a subfolder.
$ npm i https://cdn.cypress.io/beta/npm/.../cypress.tgz
422
433
```
423
434
424
-
Note that unzipping Linux binary inside Docker container onto a mapped volume drive is slow. But once this is done you can modify application resource folder in local folder `/tmp/test-folder/node_modules/cypress/cypress-cache/3.3.0/Cypress/resources/app` to debug issues.
435
+
Note that unzipping the Linux binary inside a Docker container onto a mapped volume drive is *slow*. But once this is done you can modify the application resource folder in the local folder `/tmp/test-folder/node_modules/cypress/cypress-cache/3.3.0/Cypress/resources/app` to debug issues.
You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.
set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.5.0/win32-ia32/appveyor-develop-c1416035e9cd0dfc0bd342ea2992cd8b4bc7a888-28190934/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.5.0/win32-ia32/appveyor-develop-c1416035e9cd0dfc0bd342ea2992cd8b4bc7a888-28190934/cypress.zip
You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.
set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.5.0/win32-x64/appveyor-develop-c1416035e9cd0dfc0bd342ea2992cd8b4bc7a888-28190934/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.5.0/win32-x64/appveyor-develop-c1416035e9cd0dfc0bd342ea2992cd8b4bc7a888-28190934/cypress.zip
4 commit comments
cypress-bot[bot] commentedon Oct 17, 2019
Circle has built the
linux x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.cypress-bot[bot] commentedon Oct 17, 2019
AppVeyor has built the
win32 ia32
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.cypress-bot[bot] commentedon Oct 17, 2019
AppVeyor has built the
win32 x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.cypress-bot[bot] commentedon Oct 17, 2019
Circle has built the
darwin x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.