cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1k stars 376 forks source link

docs: rework factory readme examples #1104

Closed MikeMcC399 closed 3 weeks ago

MikeMcC399 commented 1 month ago

Issues

The factory/README file contains examples that do not run and are incomplete.

  1. The specified Chrome and Edge browser versions are no longer available for download and all build examples fail.
  2. If the build commands are re-run they fail to install the Cypress binary due to Docker caching. Attempting to run Cypress then fails due to missing Cypress binary.
  3. The run examples rely on a Cypress project which is not defined.

Changes

Versions

Example versions are updated to latest.

Component New version
NODE_VERSION 20.14.0
YARN_VERSION 1.22.22
CYPRESS_VERSION 13.11.0
CHROME_VERSION 125.0.6422.141-1
FIREFOX_VERSION 126.0.1
EDGE_VERSION 125.0.2535.85-1

Cypress binary

npx cypress install is added, together with an explanation to ensure that the Cypress binary is also installed into the image.

Cypress project

A description of how to create a simple example Cypress E2E project is added.

Other changes

Docker compose

Run examples

cypress-app-bot commented 1 month ago
MikeMcC399 commented 1 month ago

Verification

Refer to https://github.com/MikeMcC399/cypress-docker-images/blob/factory-readme-examples/factory/README.md

Prepare example project according to

https://github.com/MikeMcC399/cypress-docker-images/blob/factory-readme-examples/factory/README.md#example-project

Test the instructions as published. Ensure that tests run even after the build commands has been re-run.

In the Dockerfile

https://github.com/MikeMcC399/cypress-docker-images/blob/factory-readme-examples/factory/README.md#in-the-dockerfile

At build time

https://github.com/MikeMcC399/cypress-docker-images/blob/factory-readme-examples/factory/README.md#at-build-time

In docker-compose.yml

https://github.com/MikeMcC399/cypress-docker-images/blob/factory-readme-examples/factory/README.md#in-docker-composeyml

Reducing the size of the docker container

https://github.com/MikeMcC399/cypress-docker-images/blob/factory-readme-examples/factory/README.md#reducing-the-size-of-the-docker-container

MikeMcC399 commented 3 weeks ago

@jennifer-shehane

Thanks for updating!

Thanks for merging! 🙂 There is more to come and I'm trying to keep the PR contents in manageable chunks for review.