Skip to content
31 changes: 23 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-node@v1
- name: npm install, build, and test
run: |
npm install doctest standard --save-dev
npx doctest **/*.js || true # TODO: error: Line 1: Unexpected token >>
# TODO: Remove the next line when #539 is fixed.
rm Dynamic-Programming/MinimumCostPath.js Graphs/PrimMST.js Hashes/*.js
# npx doctest **/*.js
npx standard
npm ci
npm run build --if-present
Expand All @@ -24,3 +20,22 @@ jobs:
npm test
env:
CI: true
- run: npx doctest Backtracking/*.js
- run: npx doctest Cache/*.js
- run: npx doctest Ciphers/*.js
- run: npx doctest Conversions/*.js
- run: npx doctest Data-Structures/*/*.js
- run: npx doctest Dynamic-Programming/*.js
- run: npx doctest Graphs/*.js
- run: npx doctest Hashes/*.js || true
- run: npx doctest Linear-Algebra/*.js || true
- run: npx doctest Maths/*.js || true
- run: npx doctest Navigation/*.js || true
- run: npx doctest Project-Euler/*.js || true
- run: npx doctest Recursive/*.js || true
- run: npx doctest Search/*.js || true
- run: npx doctest Sorts/*.js || true
- run: npx doctest String/*.js || true
- run: npx doctest Timing-Functions/*.js || true
- run: npx doctest Trees/*.js || true
- run: npx doctest Web-Programming/*.js || true