forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run travis tests only on changed modules
Rakefile is changed to allow specifying modules to test and travis now runs .travis.sh which gets changed modules from Puppetfile.
- Loading branch information
Showing
3 changed files
with
17 additions
and
12 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,11 @@ | ||
#!/bin/bash | ||
set -ev | ||
MODS="$(git diff HEAD~1 Puppetfile | grep ^- -B2 | grep mod | cut -d"'" -f2)" | ||
rake validate_puppetfile SPEC_OPTS='--format documentation --color --backtrace' || exit 1 | ||
for module in ${MODS}; do | ||
if [ -e ./${module}/Rakefile ]; then | ||
rake test_modules[./${module}/Rakefile] SPEC_OPTS='--format documentation --color --backtrace' || exit 1 | ||
else | ||
echo "Missing ./${module}/Rakefile, not running spec tests." | ||
fi | ||
done |
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 |
---|---|---|
@@ -1,19 +1,12 @@ | ||
language: ruby | ||
install: | ||
- gem install bundler | ||
- gem install rake | ||
- gem install r10k | ||
script: "rake test SPEC_OPTS='--format documentation --color --backtrace'" | ||
script: "./travis.sh" | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
matrix: | ||
fast_finish: true | ||
env: | ||
matrix: | ||
- PUPPET_GEM_VERSION="~> 3.3.0" | ||
- PUPPET_GEM_VERSION="~> 3.4.0" | ||
- PUPPET_GEM_VERSION="~> 3.6.0" | ||
- PUPPET_GEM_VERSION="~> 3.7.0" | ||
notifications: | ||
email: false |
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