Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,29 @@ env:
global:
- 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=

matrix:
include:
- rust: stable
os: linux
env: CONTENT_TESTS=1
- rust: stable
os: linux
env: CONTENT_TESTS=1 CONTENT_TESTS_LINKS=1
allow_failures:
- rust: stable
os: linux
env: CONTENT_TESTS=1 CONTENT_TESTS_LINKS=1

addons:
apt:
packages:
- aspell
- aspell-en

before_install:
- cargo install mdbook --vers '0.1.7' --debug
- ./ci/install_deps.sh
- export PATH=$HOME/.cargo/bin:$PATH

after_success: ./deploy.sh
script: ./ci/test_script.sh

after_success: ./ci/deploy.sh
26 changes: 17 additions & 9 deletions deploy.sh → ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -o errexit -o nounset

echo "Running $0"

if [ -z "${TRAVIS_BRANCH:-}" ]; then
echo "This script may only be run from Travis!"
exit 1
Expand All @@ -14,16 +16,22 @@ if [[ "$TRAVIS_BRANCH" != "master" || "$TRAVIS_RUST_VERSION" != "stable" || "$TR
exit 0
fi

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

cargo test || { echo "Cron build failed! Dependencies outdated!"; exit 1; }
echo "Cron build success! Dependencies are up to date!"
if [ -z "${CONTENT_TESTS:-}" ]; then
# check for outdated dependencies on nightly builds
if [ "${TRAVIS_EVENT_TYPE:-}" == "cron" ]; then
echo "This is cron build. Checking for outdated dependencies!"
rm ./Cargo.lock
cargo clean
# replace all [dependencies] versions with "*"
sed -i -e "/^\[dependencies\]/,/^\[.*\]/ s|^\(.*=[ \t]*\).*$|\1\"\*\"|" ./Cargo.toml

cargo test || { echo "Cron build failed! Dependencies outdated!"; exit 1; }
echo "Cron build success! Dependencies are up to date!"
exit 0
fi

echo "We deploy only after we also test the markup and descriptions!"
exit 0
fi

Expand Down
Loading