diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96d6b774..89378f2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,8 @@ on: branches: - dev jobs: - all-tests: + run-tests: + name: All tests permissions: contents: read id-token: write @@ -25,4 +26,46 @@ jobs: - name: Install dependencies run: npm install - name: Build - run: npm run build \ No newline at end of file + run: npm run build + - name: All tests + run: npm run test + test-code-examples: + name: Test inline typedoc examples + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + - name: Setup Nodejs + uses: actions/setup-node@v4 + with: + node-version: 18.12.0 + cache: 'npm' + - name: Install dependencies + run: npm install + - name: Build Docs + run: npm run build && npm run docs:json + - name: Code example tests + run: npm run test:examples + test-html-examples: + name: Test HTML Examples + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + - name: Setup Nodejs + uses: actions/setup-node@v4 + with: + node-version: 18.12.0 + cache: 'npm' + - name: Install dependencies + run: npm install + - name: Build Docs + run: npm run build + - name: Code example tests + run: npm run test:html \ No newline at end of file diff --git a/package.json b/package.json index a077f577..62ad7604 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "build": "npm run increment && rm -rf build && npm run ts:build && npm run webpack:build", "codecov": "codecov", "docs": "node scripts/generate_docs.cjs", - "docs:json": "cross-var typedoc --options \"./scripts/typedoc.json\" --json \"$npm_config_docs_json\"", + "docs:json": "cross-var typedoc --options \"./scripts/typedoc.json\" --json \"./docs/tone.json\"", "increment": "node scripts/increment_version.cjs", "karma": "cross-var karma start ./test/karma.conf.cjs --single-run --file $npm_config_file --dir $npm_config_dir", "karma:browser": "cross-var karma start ./test/karma.conf.cjs --auto-watch --browsers OnlineChrome --file $npm_config_file --dir $npm_config_dir",