Skip to content

Commit

Permalink
CHANGE circleci config to orbs and run cypress in a orb
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Oct 15, 2019
1 parent b8ef6a7 commit 3ab4bba
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 2
version: 2.1
orbs:
cypress: cypress-io/cypress@1

aliases:
- &defaults
Expand Down Expand Up @@ -64,24 +66,24 @@ jobs:
command: |
cd examples/official-storybook
yarn packtracker
cypress:
working_directory: /tmp/storybook
docker:
- image: cypress/base:8
environment:
TERM: xterm
steps:
- checkout
- attach_workspace:
at: .
- run:
name: install optional dependencies
command: |
yarn install
- run:
name: Run cypress
command: |
yarn test:e2e-ci
# cypress:
# working_directory: /tmp/storybook
# docker:
# - image: cypress/base:8
# environment:
# TERM: xterm
# steps:
# - checkout
# - attach_workspace:
# at: .
# - run:
# name: install optional dependencies
# command: |
# yarn install
# - run:
# name: Run cypress
# command: |
# yarn test:e2e-ci
examples:
<<: *defaults
steps:
Expand Down Expand Up @@ -206,7 +208,7 @@ jobs:
- core-dependencies-v3-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install
command: yarn bootstrap --install
- run:
name: Trigger build
command: ./scripts/build-frontpage.js
Expand Down Expand Up @@ -238,11 +240,6 @@ jobs:
key: docs-dependencies-v2-{{ checksum "docs/yarn.lock" }}
paths:
- ~/.cache/yarn
- persist_to_workspace:
root: .
paths:
- docs/public
- docs/node_modules
lint:
<<: *defaults
steps:
Expand Down Expand Up @@ -275,20 +272,21 @@ jobs:
name: Upload coverage
command: yarn coverage
workflows:
version: 2
build_test_deploy:
test:
jobs:
- build
- docs
- frontpage
- lint:
requires:
- docs
- build
- examples:
requires:
- build
- cypress:
- cypress/run:
no-workspace: true
yarn: true
cache-key: 'core-dependencies-v3-{{ checksum "yarn.lock" }}'
start: serve-storybooks
wait-on: 'https://localhost:8001'
requires:
- examples
- smoke-tests:
Expand All @@ -309,3 +307,7 @@ workflows:
- chromatic:
requires:
- build
deploy:
jobs:
- docs
- frontpage

0 comments on commit 3ab4bba

Please sign in to comment.