From 5c0add023193efc3299641909e11f6ed91e6a654 Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Tue, 13 Aug 2019 08:16:01 -0700 Subject: [PATCH] ci: add docs tests (#188) --- .circleci/config.yml | 12 ++++++++++++ package.json | 2 ++ packages/opentelemetry-types/package.json | 2 ++ 3 files changed, 16 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b30701b75f2..931821b9300 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,6 +54,17 @@ jobs: - run: name: Check code style and linting command: yarn run check + docs: + docker: + - image: node + steps: + - checkout + - run: + name: Install modules and dependencies. + command: yarn install + - run: + name: Docs tests + command: yarn docs-test node8: docker: - image: node:8 @@ -80,6 +91,7 @@ workflows: build: jobs: - lint + - docs - node8 - node10 - node11 diff --git a/package.json b/package.json index 1212309228a..8a13ba689bb 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "bump": "lerna publish", "codecov": "lerna run codecov", "check": "lerna run check", + "predocs-test": "yarn docs", + "docs-test": "lerna run docs-test", "docs": "lerna run docs" }, "repository": "open-telemetry/opentelemetry-js", diff --git a/packages/opentelemetry-types/package.json b/packages/opentelemetry-types/package.json index 8e812170917..50d1c2194a5 100644 --- a/packages/opentelemetry-types/package.json +++ b/packages/opentelemetry-types/package.json @@ -11,6 +11,7 @@ "compile": "tsc -p .", "fix": "gts fix", "test": "npm run compile && npm run check", + "docs-test": "linkinator docs/out", "docs": "typedoc --tsconfig tsconfig.json" }, "keywords": [ @@ -39,6 +40,7 @@ }, "devDependencies": { "gts": "^1.0.0", + "linkinator": "^1.5.0", "typedoc": "^0.14.2", "typescript": "^3.4.5" }