Skip to content

Commit

Permalink
Split nightly tests into two jobs on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
koute committed Mar 5, 2018
1 parent 81c959b commit 00dad5d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ jobs:
- <<: *test
os: linux
rust: nightly
env: TEST_SUBSET=1
- <<: *test
os: linux
rust: nightly
env: TEST_SUBSET=2
- <<: *test
os: linux
rust: beta
Expand Down
47 changes: 27 additions & 20 deletions ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ IFS=$'\n\t'
export REPOSITORY_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
export CARGO_WEB=$REPOSITORY_ROOT/target/debug/cargo-web

TEST_SUBSET=${TEST_SUBSET:-0}

ONLY_LOCAL=0
for ARG in "$@"
do
Expand Down Expand Up @@ -33,33 +35,38 @@ cd $REPOSITORY_ROOT

echo "++ Is Rust from nightly: $IS_NIGHTLY"

cargo test
cargo build

rustup target add x86_64-apple-darwin
rustup target add i686-pc-windows-gnu
if [[ "$TEST_SUBSET" == 0 || "$TEST_SUBSET" == 1 ]]; then
cargo test

cargo check --target=x86_64-apple-darwin
cargo check --target=i686-pc-windows-gnu
rustup target add x86_64-apple-darwin
rustup target add i686-pc-windows-gnu

echo ""
cargo check --target=x86_64-apple-darwin
cargo check --target=i686-pc-windows-gnu

cd integration-tests
cargo run
cd ..
echo ""

echo "++ Basic test crate tests passed!"
cd integration-tests
cargo run
cd ..

if [ "$ONLY_LOCAL" == "1" ]; then
echo "++ Will not run further tests since I was called with '--only-local'!"
exit 0
echo "++ Basic test crate tests passed!"
fi

if [ -d "../stdweb" ]; then
cd ../stdweb
else
git clone --depth 1 https://github.com/koute/stdweb.git
cd stdweb
fi
if [[ "$TEST_SUBSET" == 0 || "$TEST_SUBSET" == 2 ]]; then
if [ "$ONLY_LOCAL" == "1" ]; then
echo "++ Will not run further tests since I was called with '--only-local'!"
exit 0
fi

./ci/run_tests.sh
if [ -d "../stdweb" ]; then
cd ../stdweb
else
git clone --depth 1 https://github.com/koute/stdweb.git
cd stdweb
fi

./ci/run_tests.sh
fi

0 comments on commit 00dad5d

Please sign in to comment.