Skip to content

Commit c297a24

Browse files
authored
chore: validate urls in Markdown files (cypress-io#136)
* validate urls in Markdown files * only run npm publish job on master branch * simpler find command * move branches to workflow section * for the right job
1 parent f3f8de9 commit c297a24

File tree

4 files changed

+113
-3
lines changed

4 files changed

+113
-3
lines changed

.circleci/config.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# https://circleci.com/docs/2.0/configuration-reference/
12
version: 2.1
23
orbs:
34
cypress: cypress-io/[email protected] # used to run e2e tests
@@ -18,7 +19,9 @@ jobs:
1819
workflows:
1920
build:
2021
jobs:
21-
- cypress/install
22+
- cypress/install:
23+
post-steps:
24+
- run: npm run check:markdown
2225
- cypress/run:
2326
name: frontend coverage
2427
requires:
@@ -66,6 +69,10 @@ workflows:
6669
- run: npx nyc report --check-coverage true --lines 100 --include test-backend/index.js
6770

6871
- publish:
72+
filters:
73+
branches:
74+
only:
75+
- master
6976
requires:
7077
- frontend coverage
7178
- backend coverage

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,17 @@ npx nyc report --check-coverage true --lines 100 --include cypress/about.js
319319
npx nyc report --check-coverage true --lines 100 --include cypress/unit.js
320320
```
321321

322+
### Markdown
323+
324+
You can validate links in Markdown files in this directory by executing (Linux + Mac only) script
325+
326+
```shell
327+
npm run check:markdown
328+
```
329+
322330
## License
323331

324-
This project is licensed under the terms of the [MIT license](/LICENSE.md).
332+
This project is licensed under the terms of the [MIT license](LICENSE.md).
325333

326334
[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
327335
[renovate-app]: https://renovateapp.com/

package-lock.json

+93
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"format": "prettier --write '*.js'",
1616
"start:test:backend": "nyc --silent node test-backend",
1717
"cy:backend": "cypress open --config-file cypress-backend.json",
18-
"dev:backend": "start-test start:test:backend 3003 cy:backend"
18+
"dev:backend": "start-test start:test:backend 3003 cy:backend",
19+
"check:markdown": "find *.md -exec npx markdown-link-check {} \\;"
1920
},
2021
"peerDependencies": {
2122
"cypress": "*",
@@ -59,6 +60,7 @@
5960
"express": "4.17.1",
6061
"istanbul-lib-coverage": "3.0.0",
6162
"lodash": "4.17.15",
63+
"markdown-link-check": "3.8.0",
6264
"nyc": "15.0.0",
6365
"parcel-bundler": "1.12.4",
6466
"prettier": "1.19.1",

0 commit comments

Comments
 (0)