Skip to content

Commit 0cc1597

Browse files
committed
Add a script to validate docs
1 parent 4a8b4c7 commit 0cc1597

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

docker-compose.docs-snapshots.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
volumes:
2-
# This is a temporary directory that is used to store the test sets and results.
3-
# It is mounted in the extractor and snapshotter containers.
4-
# The results are then copied back to the plugins directories.
5-
test-sets:
6-
driver: local
7-
driver_opts:
8-
type: none
9-
device: ./docker/build/test-sets
10-
o: bind
11-
121
services:
132
# Test server that has all the plugins loaded. Test sets are run against this server.
143
deephaven-plugins-docs-test-server:
@@ -38,7 +27,7 @@ services:
3827
volumes:
3928
- ./plugins/ui/docs/build/markdown:/extract/ui
4029
- ./plugins/plotly-express/docs/build/markdown:/extract/plotly-express
41-
- test-sets:/results # Output to a temporary build directory
30+
- ./docker/build/test-sets:/results # Output to a temporary build directory
4231

4332
# Read the test sets from the results directory and run them against the test server, taking a snapshot of the results.
4433
deephaven-plugins-docs-snapshotter:
@@ -58,7 +47,16 @@ services:
5847
'node snapshot.cjs --directory /test-sets/plotly-express --output /results/plotly-express; node snapshot.cjs --directory /test-sets/ui --output /results/ui',
5948
]
6049
volumes:
61-
- test-sets:/test-sets
50+
- ./docker/build/test-sets:/test-sets
6251
# Map all the results back to the snapshots directory for those docs
6352
- ./plugins/ui/docs/snapshots:/results/ui
6453
- ./plugins/plotly-express/docs/snapshots:/results/plotly-express
54+
55+
# Validate MDX and the snapshots that were written are valid
56+
deephaven-plugins-docs-validator:
57+
image: ghcr.io/deephaven/salmon-validator
58+
pull_policy: always
59+
volumes:
60+
- ./plugins/ui/docs/build/markdown:/validate/ui
61+
- ./plugins/plotly-express/docs/build/markdown:/validate/plotly-express
62+
- ./docker/build/validator-results:/results

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"e2e:update-snapshots": "./tools/run_docker.sh ./tests/docker-compose.yml update-snapshots",
2727
"update-dh-packages": "lerna run --concurrency 1 update-dh-packages",
2828
"update-dh-packages:ui": "npm run update-dh-packages -- --scope=@deephaven/js-plugin-ui --",
29-
"update-doc-snapshots": "./tools/run_docker.sh ./docker-compose.docs-snapshots.yml deephaven-plugins-docs-snapshotter"
29+
"update-doc-snapshots": "./tools/run_docker.sh ./docker-compose.docs-snapshots.yml deephaven-plugins-docs-snapshotter",
30+
"validate-doc-snapshots": "./tools/run_docker.sh ./docker-compose.docs-snapshots.yml deephaven-plugins-docs-validator"
3031
},
3132
"devDependencies": {
3233
"@deephaven/babel-preset": "^0.72.0",

0 commit comments

Comments
 (0)