Skip to content

Commit 0c167cb

Browse files
budziqAndyGauge
authored andcommitted
support for additional linters (link-checker & aspell) (#410)
* Added support for additional linters (html-proofer link checker) - added additional test matrix item just for linters - install and build mdbook only when needed to speedup CI - reorganized the travis scripts * Added spellchecking script from rust-book to CI also fixed minor typos * updated and moved serde_json links to propper position * move link checking to link-checker
1 parent af25e61 commit 0c167cb

11 files changed

+554
-24
lines changed

.travis.yml

+23-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,29 @@ env:
1212
global:
1313
- secure: m28oDDxTcaLlbCXv9la/yz0PzafOCDuhOhmHRoc1ELQC0wc3r6HT3a2myrP5ewQQhaxYDzd2XXYDJB3odFV1qLQOp0hFDgNn/w3ctWZpJdLxIJN6dsaPL/azhE2hz7T+SPEoWLwTW1va6bu4wwzSOykt9//RIK0ZoyVMCRSAlMB965iMV2Nkw7SWdQZ8SlskMVk8sB103N5+WTtt6rse54jHnXTpFEq9q0EAXC1R3GBDKEWB7iwb0c++Kw46Fz86ZJJDotiVuxMtsEk0VfT0Yxx665is5Ko6sV4cahbuXqMIqYYEfqpTHNHadHWD1m1i32hW9Rjtt9fFZ+a8m9zfTixPlkfOZvQ94RnD2zqv9qiwFr8oR7t2SsZaB4aqPlJd45DqgnwQ1B0cmrUAsjSB2+1DQDkR4FgKFB/o1c6F6g8imNh+2OwiZXVLwIimXNJQ5xfZeObXFMrEZ0+uj7oxFX49EcwE/SvwsVJHST3/zL5QuQwa9/uVhW/x135/Z2ypVao2xydpow/KL8VwhX9YsOSP5ApffL4OLJ5hE9qwS/SShHGg8AenFqqm/UNFqWDU+C097YaWvG5PEvCVXvOofic65AUTCmwB+h3MSQmZIqz2sb/kwdbtkoRRR6maMgelQmg1JdIfQcKeTJIStIihjk54VENHPVAslz0oV7Ia5Bo=
1414

15+
matrix:
16+
include:
17+
- rust: stable
18+
os: linux
19+
env: CONTENT_TESTS=1
20+
- rust: stable
21+
os: linux
22+
env: CONTENT_TESTS=1 CONTENT_TESTS_LINKS=1
23+
allow_failures:
24+
- rust: stable
25+
os: linux
26+
env: CONTENT_TESTS=1 CONTENT_TESTS_LINKS=1
27+
28+
addons:
29+
apt:
30+
packages:
31+
- aspell
32+
- aspell-en
33+
1534
before_install:
16-
- cargo install mdbook --vers '0.1.7' --debug
35+
- ./ci/install_deps.sh
1736
- export PATH=$HOME/.cargo/bin:$PATH
1837

19-
after_success: ./deploy.sh
38+
script: ./ci/test_script.sh
39+
40+
after_success: ./ci/deploy.sh

deploy.sh renamed to ci/deploy.sh

+17-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -o errexit -o nounset
44

5+
echo "Running $0"
6+
57
if [ -z "${TRAVIS_BRANCH:-}" ]; then
68
echo "This script may only be run from Travis!"
79
exit 1
@@ -14,16 +16,22 @@ if [[ "$TRAVIS_BRANCH" != "master" || "$TRAVIS_RUST_VERSION" != "stable" || "$TR
1416
exit 0
1517
fi
1618

17-
# check for outdated dependencies on nightly builds
18-
if [ "${TRAVIS_EVENT_TYPE:-}" == "cron" ]; then
19-
echo "This is cron build. Checking for outdated dependencies!"
20-
rm ./Cargo.lock
21-
cargo clean
22-
# replace all [dependencies] versions with "*"
23-
sed -i -e "/^\[dependencies\]/,/^\[.*\]/ s|^\(.*=[ \t]*\).*$|\1\"\*\"|" ./Cargo.toml
2419

25-
cargo test || { echo "Cron build failed! Dependencies outdated!"; exit 1; }
26-
echo "Cron build success! Dependencies are up to date!"
20+
if [ -z "${CONTENT_TESTS:-}" ]; then
21+
# check for outdated dependencies on nightly builds
22+
if [ "${TRAVIS_EVENT_TYPE:-}" == "cron" ]; then
23+
echo "This is cron build. Checking for outdated dependencies!"
24+
rm ./Cargo.lock
25+
cargo clean
26+
# replace all [dependencies] versions with "*"
27+
sed -i -e "/^\[dependencies\]/,/^\[.*\]/ s|^\(.*=[ \t]*\).*$|\1\"\*\"|" ./Cargo.toml
28+
29+
cargo test || { echo "Cron build failed! Dependencies outdated!"; exit 1; }
30+
echo "Cron build success! Dependencies are up to date!"
31+
exit 0
32+
fi
33+
34+
echo "We deploy only after we also test the markup and descriptions!"
2735
exit 0
2836
fi
2937

0 commit comments

Comments
 (0)