-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Kitura tests in travis CI (#290)
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Run Kitura-net tests | ||
travis_start "swift_test" | ||
echo ">> Executing Kitura-net tests" | ||
swift test | ||
SWIFT_TEST_STATUS=$? | ||
travis_end | ||
if [ $SWIFT_TEST_STATUS -ne 0 ]; then | ||
echo ">> swift test command exited with $SWIFT_TEST_STATUS" | ||
# Return a non-zero status so that Package-Builder will generate a backtrace | ||
return $SWIFT_TEST_STATUS | ||
fi | ||
|
||
# Clone Kitura | ||
set -e | ||
echo ">> Building Kitura" | ||
travis_start "swift_build_kitura" | ||
cd .. && git clone https://github.com/IBM-Swift/Kitura && cd Kitura | ||
|
||
# Build once | ||
swift build | ||
|
||
# Edit package Kitura-net to point to the current branch | ||
echo ">> Editing Kitura package to use latest Kitura-net" | ||
swift package edit Kitura-net --path ../Kitura-net | ||
travis_end | ||
set +e | ||
|
||
# Run Kitura tests | ||
travis_start "swift_test_kitura" | ||
echo ">> Executing Kitura tests" | ||
swift test | ||
SWIFT_TEST_STATUS=$? | ||
travis_end | ||
if [ $SWIFT_TEST_STATUS -ne 0 ]; then | ||
echo ">> swift test command exited with $SWIFT_TEST_STATUS" | ||
# Return a non-zero status so that Package-Builder will generate a backtrace | ||
return $SWIFT_TEST_STATUS | ||
fi | ||
|
||
# Move back to the original build directory. This is needed on macOS builds for the subsequent swiftlint step. | ||
cd ../Kitura-net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters