Skip to content

Commit

Permalink
CI: Separate running linters to another job on Travis CI
Browse files Browse the repository at this point in the history
because running linters takes the longest time among CI jobs
  • Loading branch information
rhysd committed Jun 10, 2018
1 parent 749da85 commit c18f991
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ matrix:
env:
- VIM_VERSION=master
- THEMIS_PROFILE=vim-profile-master.txt
- RUN_LINT=true
- os: osx
osx_image: xcode8.3
env:
- THEMIS_PROFILE=vim-profile-osx.txt
- os: linux
env:
- RUN_LINT=true

addons:
apt:
Expand Down Expand Up @@ -53,16 +55,14 @@ script:
- uname -a
- which -a vim
- vim --cmd version --cmd quit
- vim --cmd "try | helptags doc/ | catch | cquit | endtry" --cmd quit
# - /tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --reporter dot
- /tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --exclude ConcurrentProcess --reporter dot
- ruby scripts/check-changelog.rb
- |
if [[ "${RUN_LINT}" != "true" ]]; then
/tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --exclude ConcurrentProcess --reporter dot
fi
- if [[ "${RUN_LINT}" == "true" ]] ; then bash scripts/run-lint-on-ci.sh ; fi

after_success:
- covimerage write_coverage $THEMIS_PROFILE
- coverage xml
- bash <(curl -s https://codecov.io/bash)
- bash scripts/coverage.sh

notifications:
webhooks:
Expand Down
11 changes: 11 additions & 0 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -ev

if [[ "${THEMIS_PROFILE}" == "" ]]; then
exit
fi

covimerage write_coverage $THEMIS_PROFILE
coverage xml
bash <(curl -s https://codecov.io/bash)
3 changes: 3 additions & 0 deletions scripts/install-vim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -ev

case "${TRAVIS_OS_NAME}" in
linux)
if [[ "${VIM_VERSION}" == "" ]]; then
exit
fi
git clone --depth 1 --branch "${VIM_VERSION}" https://github.com/vim/vim /tmp/vim
cd /tmp/vim
./configure --prefix="${HOME}/vim" --with-features=huge \
Expand Down
6 changes: 6 additions & 0 deletions scripts/run-lint-on-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ go get -d -v ./scripts

# Run reviewdog.
reviewdog -reporter=github-pr-check

# Check tag name conflicts
vim --cmd "try | helptags doc/ | catch | cquit | endtry" --cmd quit

# Validate changelog
ruby scripts/check-changelog.rb

0 comments on commit c18f991

Please sign in to comment.