Skip to content

Commit

Permalink
Added test for TOC to .travis.yml (k88hudson#205)
Browse files Browse the repository at this point in the history
Runs doctoc for README*.md.
If in newly doctoc'ed README*.md there are any diffs against
ones commited in git HEAD then the test failes.
The script are using the latest anchor-markdown-header from repo
to avoid the bug with non-ASCII headers.
  • Loading branch information
buslov authored and RichardLitt committed Jan 14, 2018
1 parent ea40bf7 commit 14ea082
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ rvm:
- 2.2
before_script:
- gem install awesome_bot
- npm install
script:
- awesome_bot README.md --allow-dupe --allow-redirect
- awesome_bot README_*.md --allow-dupe --allow-redirect
- node node_modules/doctoc/doctoc.js --github README.md README_*.md
- test -z "`git diff -- README.md`"
- test -z "`git diff -- README_*.md`"
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"private": true,
"name": "git-flight-rules",
"version": "1.0.0",
"description": "Flight rules for git",
"devDependencies": {
"doctoc": "^1.3.0",
"anchor-markdown-header": "thlorenz/anchor-markdown-header#master"
}
}

0 comments on commit 14ea082

Please sign in to comment.