-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
62 lines (56 loc) · 2.79 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
################
# CI Workflow:
# feature development, trigger by `git push`:
# test -> code_audit(code_security_audit and code_quality_audit)
#
# feature deploy, trigger by `git push --tags`
# test -> deploy
#
# Stages:
# - test: run `rake test`
# - code_audit: run `code_quality security_audit` and `code_quality quality_audit`
# - deploy: auto build and upload a gem package to rubygems.org after `git push --tags`
#
# Principle:
# - fail fast
# - done is better than perfect
################
stages:
- test
- code_audit
- deploy
language: ruby
rvm:
- 2.5.3
- 2.6.0
before_install: gem install bundler
# config GitHub OAuth Token
env:
global:
secure: HLfW6QDOiyxaM7wBRDzdF9ud0Ey1EVL/rdnvt8TvM7VUbtUt4wLlCbUcIIASbxrv0AV/MtpkS4n9O/WIk3rcdndoUzoPtYBNIKI9McJuunoSxzY2pwlF7scZz0aE64OJCCshCEeaNRR5p8yw7Lw4gptsdFmceIVXyPfGEG924arSwFcAhMUnWxaIBFamH9/j2KXrq0RkagX2b4+HUqH1at4cfc/otFUbvQxaGL5eaxI+ReZU3MwO3uxAvdoWoiWpAS3NDTxJKN9GMT6a67wzbxGPERj2G75sGubwVJfvRhdh+BgjAOJjgSMaUMYn2HA9phN5Mkb0z9yaZu2RuBzEscHv8Cq8pSVHb75IvjBdk2Ovsq3R25D/jFdTPnLnJxsrWYVLDDSyJvpyc1aOcws/Ry7MEX8v+Lt0gWJraleTcfn51ulZY/cWlD8utVqvTjfjGjKEZrmYXn5nu0xTJ3vYHMttqKavh6nQxcc7cDRLbVDE5GI9PUjENNP+ZxY0ldiSQiYm+S/1OuHZP9/z6DXMhIDUFZBNSIy3dkKW5bUFQNeb40mi0muS8elqoKQ/fkumU7YmKEVrdkP6wyL6LEa4HYqFAy/glktcb1r9PTSPpE/Z40rx0wemUaPSyY/2SYp1CMoSJpIHvt2IHzrlPaSuK9UTObmtH02CRqB9R8/cURU=
jobs:
include:
- stage: code_audit
if: branch != master
install: gem install code_quality --no-ri --no-rdoc
script:
- bundle install # to generate Gemfile.lock
- code_quality security_audit
- code_quality quality_audit fail_fast=false generate_index=true lowest_score=90 rubocop_max_offenses=120
deploy:
# automatically release Ruby gem to RubyGems after a successful build with `git push --tags`
- provider: rubygems
api_key:
secure: mzjlQXKByIn4jdGzUayX65Xqnl9zSkvJJZZnoqZuVnRjz93veVm9mwfUGGcSNQj9dvQTedrxMLyOKINJMIH+SlveHUeU04a7QxbM6i7o+sWRFEq98p7DauSpJJTB4fDINSwjcHU8t43PjhBItA6n4PLUrCuIzXqxvY4VLHgGLGkXV17ngdHBRRFFDuMS0npsTLLfaqaFtyYx/mer/z9pSGR9g4ETsfVFSBNafPfDAoXfK3WRLbqS8EkB7SXCSliOUuzLBEOSLy8xMOAS682dEsPZzUvUGBMrXLYhxVBECfzAMzk2VxRX0MujJxzQyGiKZUShLkDVSulkah+aHhcMqcQ0VewcELihNj86tPEtT7Uiwd6aSe0J9WrgeVE2jkaPcIZyN3eAfZ4QhQrdrHeCnjmhcMsKopzc4FLOq9B7j1WCbmeGx3scXsZkjcugwnAUm07imlUQzHO85tVxZuDbPvBQ/J/vBhuUIl1E7ptUx0eUXrVWTGDsM7RIgt87O96QXthGgVg9NYmTmvMAjts8W0zfhAQIc/13QZUYvXQ6qX95Xu4RkmeTX7T63hpqKlwSCbYbQTBF3T5X9xyKkeF0BLHZ1jMIyoOoKZFsZL+ESrpCEeq8ZDaod6Az2rIa3KgszKxV/w5vyIInhg+lzX9RF5JL8X9q9hVEvIIx5BGQWXI=
gem: code_quality
on:
tags: true
repo: rainchen/code_quality
# publish generated files to GitHub pages
- provider: script
# skip_cleanup: true
script: bin/travis-update-gh-pages.sh
on:
branch: master
tags: true
# condition: $TRAVIS_PULL_REQUEST = "false"