Skip to content

Commit

Permalink
start with basic config files for #116 (#117)
Browse files Browse the repository at this point in the history
* start with basic config files for #116

* link more basic configs

* add semaphore CI badge

* add basic circle file
  • Loading branch information
bahmutov authored Sep 12, 2018
1 parent cb27f9c commit e158b50
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ To see the kitchen sink application, visit [example.cypress.io](https://example.

## CI status

Build status | CI
:--- | :---
[![Circle CI](https://circleci.com/gh/cypress-io/cypress-example-kitchensink.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-kitchensink) | Circle
[![Travis CI](https://travis-ci.org/cypress-io/cypress-example-kitchensink.svg?branch=master)](https://travis-ci.org/cypress-io/cypress-example-kitchensink) | Travis
[![Build status](https://badge.buildkite.com/d1bd1f093d97de34475da7d545c80eb2be9749eefe1c7133f0.svg)](https://buildkite.com/cypress-io/cypress-example-kitchensink) | Buildkite
[![Windows build status](https://ci.appveyor.com/api/projects/status/bo4x59pha1eb18de?svg=true)](https://ci.appveyor.com/project/cypress-io/cypress-example-kitchensink) | AppVeyor
[![pipeline status](https://gitlab.com/cypress-io/cypress-example-kitchensink/badges/master/pipeline.svg)](https://gitlab.com/cypress-io/cypress-example-kitchensink/commits/master) | GitLab
Build status | CI | basic config file | full parallel config
:--- | :--- | :--- | :---
[![Circle CI](https://circleci.com/gh/cypress-io/cypress-example-kitchensink.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-kitchensink) | Circle | [basic/circle.yml](basic/circle.yml) | [circle.yml](circle.yml)
[![Travis CI](https://travis-ci.org/cypress-io/cypress-example-kitchensink.svg?branch=master)](https://travis-ci.org/cypress-io/cypress-example-kitchensink) | Travis | | [.travis.yml](.travis.yml)
[![Build status](https://badge.buildkite.com/d1bd1f093d97de34475da7d545c80eb2be9749eefe1c7133f0.svg)](https://buildkite.com/cypress-io/cypress-example-kitchensink) | Buildkite | [.buildkite/pipeline.yml](.buildkite/pipeline.yml)
[![Windows build status](https://ci.appveyor.com/api/projects/status/bo4x59pha1eb18de?svg=true)](https://ci.appveyor.com/project/cypress-io/cypress-example-kitchensink) | AppVeyor | [appveyor.yml](appveyor.yml)
[![pipeline status](https://gitlab.com/cypress-io/cypress-example-kitchensink/badges/master/pipeline.svg)](https://gitlab.com/cypress-io/cypress-example-kitchensink/commits/master) | GitLab | | [.gitlab-ci.yml](.gitlab-ci.yml)
[ ![Codeship Status for cypress-io/cypress-example-kitchensink](https://app.codeship.com/projects/8d6a20c0-b70e-0133-41c6-56e5cd60fbd0/status?branch=master)](https://app.codeship.com/projects/134609) | Codeship Basic
[![Run Status](https://api.shippable.com/projects/56c38fdc1895ca4474743010/badge?branch=master)](https://app.shippable.com/github/cypress-io/cypress-example-kitchensink) | Shippable
[![Run Status](https://api.shippable.com/projects/56c38fdc1895ca4474743010/badge?branch=master)](https://app.shippable.com/github/cypress-io/cypress-example-kitchensink) | Shippable | [shippable.yml](shippable.yml)
--- | Jenkins | [basic/Jenkinsfile](basic/Jenkinsfile) | [Jenkinsfile](Jenkinsfile)
[![Build Status](https://semaphoreci.com/api/v1/jennifer-mann/cypress-example-kitchensink/branches/master/badge.svg)](https://semaphoreci.com/jennifer-mann/cypress-example-kitchensink) | Semaphore

You can find all CI results recorded on the [![Cypress Dashboard](https://img.shields.io/badge/cypress-dashboard-brightgreen.svg)](https://dashboard.cypress.io/#/projects/4b7344/runs)

Expand Down
25 changes: 25 additions & 0 deletions basic/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pipeline {
agent {
// this image provides everything needed to run Cypress
docker {
image 'cypress/base:10'
}
}

stages {
stage('build and test') {
environment {
// we will be recording test results and video on Cypress dashboard
// to record we need to set an environment variable
// we can load the record key variable from credentials store
// see https://jenkins.io/doc/book/using/using-credentials/
CYPRESS_RECORD_KEY = credentials('cypress-example-kitchensink-record-key')
}

steps {
sh 'npm ci'
sh "npm run test:ci:record"
}
}
}
}
6 changes: 6 additions & 0 deletions basic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This folder contains basic configuration files for many CI providers. Each of these files should be enough to get you started running Cypress end-to-end tests.

CI | basic config file
:--- | :---
Circle | [circle.yml](circle.yml)
Jenkins | [Jenkinsfile](Jenkinsfile)
29 changes: 29 additions & 0 deletions basic/circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2
jobs:
test:
docker:
- image: cypress/base:10
steps:
- checkout
- restore_cache:
keys:
- cache-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: npm ci
- run: npm run cy:verify
- save_cache:
key: cache-{{ checksum "package.json" }}
paths:
- ~/.npm
- ~/.cache
- run:
command: npm start
background: true
- run: npm run e2e:record

workflows:
version: 2
build:
jobs:
- test

0 comments on commit e158b50

Please sign in to comment.