Skip to content

Commit 558d756

Browse files
committed
Merge pull request #24 from marocchino/pr-test-on-travis
PR test on travis
2 parents f80cc86 + 681f520 commit 558d756

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎.travis.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
sudo: false
12
language: ruby
23
cache: bundler
34
rvm:
4-
- 2.2.0
5+
- 2.2.0
56
branches:
67
only:
7-
- jekyll
8-
before_script: bundle exec rspec spec
9-
script: bundle exec rake build
10-
after_success: bundle exec rake release
8+
- jekyll
9+
- /^deploy-.*$/
10+
script: bundle exec rake travis
1111
env:
1212
global:
1313
secure: KLuKTR30DpaXXh3Vr0LoSYhXn7OsPL/yR5yoRUKB7C6MKxPFt+5gHzdPbXcx/hrcheXkQad4elxkco8qQiKWe4hNeorQFssbsvVSe2P5s2GMaYJma+WdEwDlYwsjpP98xIQ4v5vRamXehfpB8jy/n+mlvdGAIiXA/d1ka9BpkJI=

‎Rakefile‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ end
1212

1313
task :default => [:build]
1414

15+
desc "Test plugins"
16+
task :test do
17+
sh 'rspec spec'
18+
end
19+
1520
desc "Build the Jekyll site"
1621
task :build do
1722
sh 'jekyll build'
@@ -22,6 +27,8 @@ task :preview do
2227
sh 'jekyll serve --watch'
2328
end
2429

30+
task travis: ENV["TRAVIS_PULL_REQUEST"] == "false" ? [:test, :build, :release] : [:test]
31+
2532
desc "Release the current commit to ruby-korea/ruby-korea.github.io@master"
2633
task :release do
2734
commit = `git rev-parse HEAD`.chomp

0 commit comments

Comments
 (0)