Skip to content

Commit

Permalink
Use codeship pro 107 (#119)
Browse files Browse the repository at this point in the history
* add Codeship Pro files

* set name for steps

* commands

* run single spec for now

* just run all tests

* copy Cypress folder and add .dockerignore

* copy app folder

* copy codeship pro basic setup
  • Loading branch information
bahmutov authored Sep 14, 2018
1 parent 92cee80 commit 5119852
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This Docker file is for building this project on Codeship Pro
# https://documentation.codeship.com/pro/languages-frameworks/nodejs/

# use Cypress provided image with all dependencies included
FROM cypress/base:10
RUN node --version
RUN npm --version
WORKDIR /home/node/app
# copy our test application
COPY package.json package-lock.json ./
COPY app ./app
# copy Cypress tests
COPY cypress.json cypress ./
COPY cypress ./cypress

# avoid many lines of progress bars during install
# https://github.com/cypress-io/cypress/issues/1243
ENV CI=1

# install NPM dependencies and Cypress binary
RUN npm ci
# check if the binary was installed successfully
RUN $(npm bin)/cypress verify
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CI | Build status | basic config file | full parallel config
AppVeyor | [![AppVeyor CI](https://ci.appveyor.com/api/projects/status/bo4x59pha1eb18de?svg=true)](https://ci.appveyor.com/project/cypress-io/cypress-example-kitchensink) | [appveyor.yml](appveyor.yml)
Buildkite | [![Buildkite CI](https://badge.buildkite.com/d1bd1f093d97de34475da7d545c80eb2be9749eefe1c7133f0.svg)](https://buildkite.com/cypress-io/cypress-example-kitchensink) | [.buildkite/pipeline.yml](.buildkite/pipeline.yml)
Circle | [![Circle CI](https://circleci.com/gh/cypress-io/cypress-example-kitchensink.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-kitchensink) | [basic/circle.yml](basic/circle.yml) | [circle.yml](circle.yml)
Codeship Basic | [ ![Codeship Basic CI](https://app.codeship.com/projects/8d6a20c0-b70e-0133-41c6-56e5cd60fbd0/status?branch=master)](https://app.codeship.com/projects/134609)
Codeship Pro | [ ![Codeship Pro CI](https://app.codeship.com/projects/8d6a20c0-b70e-0133-41c6-56e5cd60fbd0/status?branch=master)](https://app.codeship.com/projects/134609) | [basic/codeship-pro](basic/codeship-pro)
GitLab | [![GitLab CI](https://gitlab.com/cypress-io/cypress-example-kitchensink/badges/master/pipeline.svg)](https://gitlab.com/cypress-io/cypress-example-kitchensink/commits/master) | | [.gitlab-ci.yml](.gitlab-ci.yml)
Jenkins | | [basic/Jenkinsfile](basic/Jenkinsfile) | [Jenkinsfile](Jenkinsfile)
Semaphore | [![Semaphore CI](https://semaphoreci.com/api/v1/jennifer-mann/cypress-example-kitchensink/branches/master/badge.svg)](https://semaphoreci.com/jennifer-mann/cypress-example-kitchensink)
Expand Down
1 change: 1 addition & 0 deletions basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ This folder contains basic configuration files for many CI providers. Each of th
CI | basic config file
:--- | :---
Circle | [circle.yml](circle.yml)
Codeship Pro | [codeship-pro](codeship-pro)
Jenkins | [Jenkinsfile](Jenkinsfile)
Travis | [.travis.yml](.travis.yml)
23 changes: 23 additions & 0 deletions basic/codeship-pro/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This Docker file is for building this project on Codeship Pro
# https://documentation.codeship.com/pro/languages-frameworks/nodejs/

# use Cypress provided image with all dependencies included
FROM cypress/base:10
RUN node --version
RUN npm --version
WORKDIR /home/node/app
# copy our test application
COPY package.json package-lock.json ./
COPY app ./app
# copy Cypress tests
COPY cypress.json cypress ./
COPY cypress ./cypress

# avoid many lines of progress bars during install
# https://github.com/cypress-io/cypress/issues/1243
ENV CI=1

# install NPM dependencies and Cypress binary
RUN npm ci
# check if the binary was installed successfully
RUN $(npm bin)/cypress verify
5 changes: 5 additions & 0 deletions basic/codeship-pro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This folder has 3 files necessary to configure Codeship Pro to execute Cypress end-to-end tests.

- [Dockerfile](Dockerfile)
- [codeship-services.yml](codeship-services.yml)
- [codeship-steps.yml](codeship-steps.yml)
7 changes: 7 additions & 0 deletions basic/codeship-pro/codeship-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cypress-codeship-test:
build:
image: cypress/cypress_codeship_test
dockerfile: Dockerfile
# if we wanted to pass private environment variables like CYPRESS_RECORD_KEY
# we would need to include encrypted env file
# see instructions https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/
4 changes: 4 additions & 0 deletions basic/codeship-pro/codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# starts server and runs all tests
- name: "Run E2E tests"
service: cypress-codeship-test
command: npm run test:ci
7 changes: 7 additions & 0 deletions codeship-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cypress-codeship-test:
build:
image: cypress/cypress_codeship_test
dockerfile: Dockerfile
# if we wanted to pass private environment variables like CYPRESS_RECORD_KEY
# we would need to include encrypted env file
# see instructions https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/
4 changes: 4 additions & 0 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# starts server and runs all tests
- name: "Run E2E tests"
service: cypress-codeship-test
command: npm run test:ci

0 comments on commit 5119852

Please sign in to comment.