Commit 05e2cbdf authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'fix/cypress-included' into 'master'

feat(template): use latest and update documentation

Closes #14

See merge request to-be-continuous/cypress!59
parents a60c05b1 8d1c8738
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ It uses the following variable:

| Input / Variable      | Description                              | Default value     |
| --------------------- | ---------------------------------------- | ----------------- |
| `image` / `CYPRESS_IMAGE` | The Docker image used to run Cypress (use [included images](https://github.com/cypress-io/cypress-docker-images/tree/master/included) only). | `docker.io/cypress/included:13.13.3` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-CYPRESS_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-CYPRESS_IMAGE) |
| `image` / `CYPRESS_IMAGE` | The Docker image used to run Cypress (use [included images](https://github.com/cypress-io/cypress-docker-images/tree/master/included) only). | `docker.io/cypress/included:latest` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-CYPRESS_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-CYPRESS_IMAGE) |
| `project-dir` / `CYPRESS_PROJECT_DIR` | The Cypress project directory (containing `cypress.config.js` or `cypress.config.ts`) | `.` |
| `extra-args` / `CYPRESS_EXTRA_ARGS` | Cypress extra [run options](https://docs.cypress.io/guides/guides/command-line.html#cypress-run) (to select a different browser, configuration or spec files for e.g.) | _none_ |
| `review-enabled` / `REVIEW_ENABLED` | Set to `true` to enable Cypress tests on review environments (dynamic environments instantiated on development branches) | _none_ (disabled) |
@@ -71,6 +71,20 @@ environments) will automatically be propagated to your Cypress tests.
If you're not using a smart deployment job, you may still explicitly declare the `CYPRESS_BASE_URL` variable (but that 
will be unfortunately hardcoded to a single server).

### arm64 runners

:warning: Browsers are not installed for ARM images, including Apple Silicon (sometimes called aarch64 or M-series). For background and possible workarounds, see [Cypress issue 1191](https://github.com/cypress-io/cypress-docker-images/issues/1191) and related issues. 

Consider [tagged runners](https://docs.gitlab.com/ci/runners/configure_runners/#control-jobs-that-a-runner-can-run) with amd64 runners for Cypress jobs, for example:

```yaml
cypress:
  ...
  ...
  tags:
    - cypress-amd64
```

### Hook scripts

The Cypress template supports _optional_ **hook scripts** from your project, located in the `$CYPRESS_PROJECT_DIR` directory to perform additional project-specific logic:
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
    {
      "name": "CYPRESS_IMAGE",
      "description": "The Docker image used to run Cypress (use [included images](https://github.com/cypress-io/cypress-docker-images/tree/master/included) only).",
      "default": "docker.io/cypress/included:13.13.3"
      "default": "docker.io/cypress/included:latest"
    },
    {
      "name": "CYPRESS_PROJECT_DIR",
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ spec:
  inputs:
    image:
      description: The Docker image used to run Cypress (use [included images](https://github.com/cypress-io/cypress-docker-images/tree/master/included) only).
      default: docker.io/cypress/included:13.13.3
      default: docker.io/cypress/included:latest
    project-dir:
      description: The Cypress project directory (containing `cypress.config.js` or `cypress.config.ts`)
      default: .
@@ -376,6 +376,7 @@ stages:
cypress:
  image:
    name: "$CYPRESS_IMAGE"
    # See https://github.com/cypress-io/cypress-docker-images/blob/master/included/README.md#gitlab-pipelines
    entrypoint: [""]
  cache:
    key: "$CI_COMMIT_REF_SLUG-cypress"