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:
parent
c2f554166a
commit
11d5403692
2 changed files with 31 additions and 0 deletions
6
Rakefile
6
Rakefile
|
@ -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
25
test.sh
Executable 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
|
Loading…
Reference in a new issue