1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Run CI locally before release

This commit is contained in:
Takashi Kokubun 2015-06-07 16:19:38 +09:00
parent c2f554166a
commit 11d5403692
2 changed files with 31 additions and 0 deletions

View file

@ -15,6 +15,11 @@ namespace :spec do
task :update do
system('cd spec && rake ugly')
end
desc 'Check all specs'
task :release do
abort 'Spec failed!' unless system('./test.sh')
end
end
namespace :rails do
@ -25,3 +30,4 @@ namespace :rails do
end
task default: [:spec, 'rails:spec']
task release: ['spec:release']

25
test.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
set -e
trap 'rm .ruby-version' 0
VERSIONS=(
2.2.2
2.1.6
2.0.0
)
function test_with() {
version=$1
rbenv local $version
ruby -v
rake spec
}
for version in ${VERSIONS[@]}; do
test_with $version
done
rbenv local ${VERSIONS[0]}
ruby -v
rake rails:spec