@@ -44,6 +44,12 @@ To run the cookbook test suite:
4444cargo test
4545```
4646
47+ To run only the skeptic tests (useful when working on examples):
48+
49+ ```
50+ cargo test --test skeptic
51+ ```
52+
4753### xtask
4854
4955To simplify common tasks like testing, building the book, and running linters.
@@ -60,6 +66,12 @@ cargo install mdbook@0.4.43 lychee@0.17.0
6066 cargo xtask test all
6167 ```
6268
69+ - To run only the skeptic tests:
70+
71+ ``` bash
72+ cargo test --test skeptic
73+ ```
74+
6375- To build the book locally:
6476
6577 ``` bash
@@ -75,28 +87,24 @@ run on the continuous integration server. These linters should be run locally
7587before submitting a pull request to ensure there are no dead links or spelling
7688errors made.
7789
78- To install the link checker, review the documentation for [ python] to install
79- python 3.6 and pip3. Installing link-checker once the dependencies are met
80- is done with pip3.
90+ To install the link checker, use Cargo:
8191
82- ```
83- [sudo] pip3 install link-checker==0.1 .0
92+ ``` bash
93+ cargo install lychee@0.17 .0
8494```
8595
86- Alternatively, add the user install directory (probably ` ~/.local/bin ` ) to
87- your PATH variable and install link-checker for your user .
96+ Checking the links of the book locally can be done with the xtask tool.
97+ First, ensure the book is built with mdBook .
8898
89- ```
90- pip3 install --user link-checker==0.1.0
99+ ``` bash
100+ cargo xtask book
101+ cargo xtask test link
91102```
92103
93- Checking the links of the book locally first requires the book to be built
94- with mdBook. From the root directory of the cookbook, the following commands
95- run the link checker.
104+ Alternatively, you can run lychee directly to check all files in the repository:
96105
97- ```
98- mdbook build
99- link-checker ./book
106+ ``` bash
107+ lychee --base . --config ./ci/lychee.toml .
100108```
101109
102110The aspell binary provides spell checking. Apt packages provide installation
@@ -132,7 +140,7 @@ Pressing `a` or `l` will not add the word to the custom dictionary.
132140If there are no errors, it will just print the local Aspell version and exit.
133141
134142[ mdbook ] : https://github.com/rust-lang-nursery/mdBook
135- [ python ] : https://packaging.python.org/tutorials/installing-packages/#install-pip-setuptools-and-wheel
143+ [ lychee ] : https://github.com/lycheeverse/lychee
136144[ skeptic ] : https://github.com/brson/rust-skeptic
137145
138146
0 commit comments