File tree 4 files changed +90
-11
lines changed
4 files changed +90
-11
lines changed Original file line number Diff line number Diff line change 12
12
global :
13
13
- 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=
14
14
15
+ matrix :
16
+ include :
17
+ - rust : stable
18
+ os : linux
19
+ env : CONTENT_TESTS=1
20
+ allow_failures :
21
+ - rust : stable
22
+ os : linux
23
+ env : CONTENT_TESTS=1
24
+
25
+
15
26
before_install :
16
- - cargo install mdbook --vers '0.0.25' --debug
27
+ - ./ci/install_deps.sh
17
28
- export PATH=$HOME/.cargo/bin:$PATH
18
29
19
- after_success : ./deploy.sh
30
+ script : ./ci/test_script.sh
31
+
32
+ after_success : ./ci/deploy.sh
Original file line number Diff line number Diff line change 2
2
3
3
set -o errexit -o nounset
4
4
5
+ echo " Running $0 "
6
+
5
7
if [ -z " ${TRAVIS_BRANCH:- } " ]; then
6
8
echo " This script may only be run from Travis!"
7
9
exit 1
@@ -14,16 +16,22 @@ if [[ "$TRAVIS_BRANCH" != "master" || "$TRAVIS_RUST_VERSION" != "stable" || "$TR
14
16
exit 0
15
17
fi
16
18
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
24
19
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!"
27
35
exit 0
28
36
fi
29
37
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -o errexit -o nounset
4
+
5
+ echo " Running $0 "
6
+
7
+ if [ -z " ${TRAVIS_BRANCH:- } " ]; then
8
+ echo " This script may only be run from Travis!"
9
+ exit 1
10
+ fi
11
+
12
+ if [[ " ${CONTENT_TESTS:- } " == 1 ]]; then
13
+ echo " Installing additional dependencies"
14
+ gem install html-proofer
15
+ cargo install mdbook --vers ' 0.0.25' --debug
16
+ fi
17
+
18
+ exit 0
19
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -o errexit -o nounset
4
+
5
+ echo " Running $0 "
6
+
7
+ if [ -z " ${TRAVIS_BRANCH:- } " ]; then
8
+ echo " This script may only be run from Travis!"
9
+ exit 1
10
+ fi
11
+
12
+ # Returns 1 if program is installed and 0 otherwise
13
+ program_installed () {
14
+ local return_=1
15
+
16
+ type $1 > /dev/null 2>&1 || { local return_=0; }
17
+
18
+ echo " $return_ "
19
+ }
20
+
21
+ if [[ " ${CONTENT_TESTS:- } " == 1 ]]; then
22
+ # Ensure required programs are installed
23
+ if [ $( program_installed htmlproofer) == 0 ]; then
24
+ echo " Please install htmlproofer: gem install html-proofer"
25
+ exit 1
26
+ elif [ $( program_installed mdbook) == 0 ]; then
27
+ echo " Please install mdbook: cargo install mdbook."
28
+ exit 1
29
+ fi
30
+
31
+ echo " Testing markup and descriptions"
32
+ echo " Building site to book/"
33
+ mdbook build
34
+ htmlproofer --empty-alt-ignore ./book/
35
+ else
36
+ echo " Testing code snippets"
37
+ cargo build --verbose
38
+ cargo test --verbose
39
+ fi
You can’t perform that action at this time.
0 commit comments