mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-13 00:48:19 -05:00
The problem last time was that we removed Pry and Pry brings in CodeRay, we were testing legacy stuff and didn't have CodeRay in our dependencies, which resulted in those tests failing. This also quietly announces the intention to move to RSpec by moving the old test dependencies to ":test_legacy" and is slightly less agressive in it's organization than before.
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# Usage: script/travis [ruby-version [file]]
|
|
# Example: script/travis 2.0 test/failing_test.rb
|
|
# Example: script/travis 2.3.0
|
|
set -e
|
|
|
|
mkdir -p vendor/docker
|
|
docker rm -fv docker-travis > /dev/null 2>&1 || true
|
|
docker run --volume=$(pwd):/home/travis/builds/jekyll/jekyll \
|
|
--workdir=/home/travis/builds/jekyll/jekyll \
|
|
--volume=$(pwd)/vendor/docker:/home/travis/builds/jekyll/jekyll/vendor/bundle \
|
|
--user=travis --name=docker-travis -dit quay.io/travisci/travis-ruby \
|
|
bash > /dev/null
|
|
|
|
status=0
|
|
if [ $# -eq 2 ]; then
|
|
docker exec -it docker-travis bash -ilc " \
|
|
rvm use --install --binary --fuzzy $1
|
|
bundle install --path vendor/bundle -j 12 \\
|
|
--without benchmark:site:development
|
|
bundle clean
|
|
script/test $2
|
|
" || status=$?
|
|
|
|
elif [ $# -eq 1 ]; then
|
|
docker exec -it docker-travis bash -ilc " \
|
|
rvm use --install --binary --fuzzy $1
|
|
bundle install --path vendor/bundle -j 12 \\
|
|
--without benchmark:site:development
|
|
bundle clean
|
|
bundle exec rake
|
|
" || status=$?
|
|
|
|
else
|
|
docker exec -it docker-travis \
|
|
bash -il || status=$?
|
|
fi
|
|
|
|
docker rm -fv docker-travis > /dev/null
|
|
exit $status
|