0.2.6 • Published 2 years ago

cypress-ci v0.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

cypress-ci

Integrate Cypress into your CI provider

Features

  • out of the box (integration without extra jobs)
  • automated (start server and test, abort CI build when a test fails)
  • safe (no more Ctrl-C, server will be shutdown gracefully)
  • extendable (import local Cypress configuration file)
  • reports (export test result as a file while logging console outputs)

Usages

Add the script below in build script in your CI provider before a build.

cypress-ci -s <serve> -u <url>

Examples

Jenkins freestyle with npm scripts

#!/bin/bash
cd /var/lib/jenkins/workspace/your-project-directory
npm ci
npm run cypress:ci
npm run build

Installation

npm

npm install --save-dev cypress-ci

yarn

yarn add --dev cypress-ci

Integration with CI providers

Prerequisites

You need dependencies below before running Cypress in CI providers.

Use official Cypress docker images

Read official Cypress documents

Install manually on Linux

Ubuntu/Debian

apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

CentOS

yum install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-deve

npm scripts

"scripts": {
  "start": "webpack serve --config webpack.config.js",
  "cypress:ci": "cypress-ci -s start -u http://localhost:3000 -c cypress.ci.json"
}

Available Options

optiondescriptiondefault
-s, --servescript to run serverstart
-u, --urlurl to testhttp://localhost:3000
-t, --timeoutmaximum time in ms to wait for a server response60000
-V, --versionoutput the version number
-h, --helpdisplay help for command

Roadmap

  • Import and override Cypress config file
  • Support typescript
  • Run on a docker image
  • Provide webpack plugin

License

MIT

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago