Skip to content

Commit 11db213

Browse files
authored
ci: run docs tests on every PR (#2746)
Split docs test into separate workflow to run on every PR
1 parent 40c4caa commit 11db213

2 files changed

Lines changed: 35 additions & 24 deletions

File tree

.github/workflows/docs-test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docs Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
17+
with:
18+
persist-credentials: false
19+
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
20+
with:
21+
node-version: "20"
22+
cache: "npm"
23+
cache-dependency-path: docs/package-lock.json
24+
- name: Install root dependencies
25+
run: npm ci
26+
working-directory: .
27+
- name: Build sinon
28+
run: npm run build-artifacts
29+
working-directory: .
30+
- name: Install docs dependencies
31+
run: npm ci
32+
working-directory: docs
33+
- name: Run docs tests
34+
run: npm run test:docs
35+
working-directory: docs

.github/workflows/docs.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,6 @@ jobs:
6060
- uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
6161
id: deployment
6262

63-
test:
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
67-
with:
68-
persist-credentials: false
69-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
70-
with:
71-
node-version: "20"
72-
cache: "npm"
73-
cache-dependency-path: docs/package-lock.json
74-
- name: Install root dependencies
75-
run: npm ci
76-
working-directory: .
77-
- name: Build sinon
78-
run: npm run build-artifacts
79-
working-directory: .
80-
- name: Install docs dependencies
81-
run: npm ci
82-
working-directory: docs
83-
- name: Run docs tests
84-
run: npm run test:docs
85-
working-directory: docs
86-
8763
link-check:
8864
runs-on: ubuntu-latest
8965
steps:

0 commit comments

Comments
 (0)