Skip to content

Commit

Permalink
update circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed May 15, 2019
1 parent 5f102ed commit 5cbea00
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
version: 2.1
orbs:
cypress: cypress-io/cypress@1.7.0
jobs:
release:
executor: cypress/base-10
steps:
- attach_workspace:
at: ~/
- run: npm run semantic-release
workflows:
build:
jobs:
- cypress/run
- release:
requires:
- cypress/run
- cypress/run:
# we need to start the web application
start: npm start
# there are no jobs to follow this one
# so no need to save the workspace files (saves time)
no-workspace: true
post-steps:
# store the created coverage report folder
# you can click on it in the CircleCI UI
# to see live static HTML site
- store_artifacts:
path: coverage
# publish new version if necessary
- run: npm run semantic-release

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ and its peer dependencies
npm install -D nyc istanbul-lib-coverage cypress
```

Add to your `cypress/support/index.js` file

```js
import 'cypress-istanbul/support'
```

Register tasks in your `cypress/plugins/index.js` file

```js
module.exports = (on, config) => {
on('task', require('cypress-istanbul/task'))
}
```

If your application is loaded Istanbul-instrumented source code, then the coverage information will be automatically saved into `.nyc_output` folder and a report will be generated after the tests finish (even in the interactive mode). Find the HTML report in the `coverage` folder.

![Coverage report](images/coverage.png)

## License

This project is licensed under the terms of the [MIT license](/LICENSE.md).
Expand Down
Binary file added images/coverage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5cbea00

Please sign in to comment.