Skip to content

Commit 5cbea00

Browse files
committed
update circleci config
1 parent 5f102ed commit 5cbea00

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

.circleci/config.yml

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
version: 2.1
2-
orbs:
3-
cypress: cypress-io/[email protected]
4-
jobs:
5-
release:
6-
executor: cypress/base-10
7-
steps:
8-
- attach_workspace:
9-
at: ~/
10-
- run: npm run semantic-release
112
workflows:
123
build:
134
jobs:
14-
- cypress/run
15-
- release:
16-
requires:
17-
- cypress/run
5+
- cypress/run:
6+
# we need to start the web application
7+
start: npm start
8+
# there are no jobs to follow this one
9+
# so no need to save the workspace files (saves time)
10+
no-workspace: true
11+
post-steps:
12+
# store the created coverage report folder
13+
# you can click on it in the CircleCI UI
14+
# to see live static HTML site
15+
- store_artifacts:
16+
path: coverage
17+
# publish new version if necessary
18+
- run: npm run semantic-release
19+

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ and its peer dependencies
1414
npm install -D nyc istanbul-lib-coverage cypress
1515
```
1616

17+
Add to your `cypress/support/index.js` file
18+
19+
```js
20+
import 'cypress-istanbul/support'
21+
```
22+
23+
Register tasks in your `cypress/plugins/index.js` file
24+
25+
```js
26+
module.exports = (on, config) => {
27+
on('task', require('cypress-istanbul/task'))
28+
}
29+
```
30+
31+
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.
32+
33+
![Coverage report](images/coverage.png)
34+
1735
## License
1836

1937
This project is licensed under the terms of the [MIT license](/LICENSE.md).

images/coverage.jpg

162 KB
Loading

0 commit comments

Comments
 (0)