Coder Social home page Coder Social logo

bahmutov / cypress-gh-action-included Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 4.0 195 KB

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

JavaScript 81.79% HTML 4.15% TypeScript 14.06%
cypress cypress-example docker github-actions

cypress-gh-action-included's Introduction

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.

cypress-gh-action-included's People

Contributors

bahmutov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cypress-gh-action-included's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.