Skip to content

Example showing if we can run cypress/included Docker image inside GH Actions CI

Notifications You must be signed in to change notification settings

bahmutov/cypress-gh-action-included

Repository files navigation

cypress-gh-action-included status

Example showing how to run cypress/included Docker image inside GH Actions CI

This repository contains the static page index.html tested by Cypress Test Runner in cypress/integration/spec.js. There is nothing to install or start, how can we run these tests in the simplest way?

Fact: you can run Cypress tests locally without installing dependencies

docker run -it -v $PWD:/test -w /test cypress/included:3.8.3

Then: run the same on GH Actions CI. See .github/workflows/included.yml, but in general

name: included
on: [push]
jobs:
  cypress-run:
    runs-on: ubuntu-latest
    # Docker image with Cypress pre-installed
    # https://github.com/cypress-io/cypress-docker-images/tree/master/included
    container: cypress/included:4.11.0
    steps:
      - uses: actions/checkout@v1
      - run: cypress run

Local plugins

This repo also shows that you can install additional NPM modules and load them from globally installed Cypress. For example, the tests use cypress-testing-library, cypress-terminal-report and typescript.

Terminal logs

Which is why on CI we need to run npm ci to install them.

About

Example showing if we can run cypress/included Docker image inside GH Actions CI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published