Skip to content

Commit

Permalink
[Tests] ensure doctoc action fails when it should
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 17, 2021
1 parent 216ccd6 commit 9cb6a2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run dockerfile_lint'
name: 'npm install && npm run doctoc'
with:
node-version: 'lts/*'
shell-command: |
set -e
cp README.md README.md.orig
npm run doctoc
diff -q README.md README.md.orig
command: "doctoc:check"

test_naming:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"test/installation/iojs": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_iojs test-$shell",
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell",
"doctoc": "doctoc --title='## Table of Contents' --github README.md",
"predoctoc:check": "cp README.md v-README.md.orig && npm run doctoc",
"doctoc:check": "diff -q README.md v-README.md.orig",
"postdoctoc:check": "mv v-README.md.orig README.md",
"eclint": "eclint check $(git ls-tree --name-only HEAD | xargs)",
"dockerfile_lint": "dockerfile_lint"
},
Expand Down

0 comments on commit 9cb6a2b

Please sign in to comment.