[danger] init (#405) [ci skip]

This commit is contained in:
dkhamsing 2016-08-15 13:28:09 -07:00 committed by GitHub
parent d4921dbae8
commit a24249441c
3 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,11 @@
language: ruby
rvm: 2.2
before_script: gem install awesome_bot
before_script:
- gem install awesome_bot
- gem install danger
script: ruby .github/osia_get_links.rb
after_script: awesome_bot check-info.txt -a 403
after_script:
- awesome_bot check-unique.txt -a 302 -w xbmc/xbmc
- awesome_bot check-links.txt --allow-dupe -w wheelmap.org,sourceforge,radioparadise
- awesome_bot check-info.txt -a 403
- danger

14
Dangerfile Normal file
View File

@ -0,0 +1,14 @@
# Check links
def ab_results(file)
require 'json'
results = File.read file
j = JSON.parse results
if j['error']==true
warn j['title']
markdown j['message']
end
end
ab_results 'ab-results-check-info.txt-markdown-table.json'
ab_results 'ab-results-check-links.txt-markdown-table.json'
ab_results 'ab-results-check-unique.txt-markdown-table.json'

View File

@ -3,20 +3,10 @@ machine:
version: 2.2.0
test:
pre:
- gem install awesome_bot
- sudo pip install json-spec
override:
- json validate --schema-file=.github/schema.json --document-file=contents.json
- ruby .github/osia_validate_categories.rb
- ruby .github/osia_get_links.rb
- awesome_bot check-unique.txt -a 302 -w xbmc/xbmc
- awesome_bot check-links.txt --allow-dupe -w wheelmap.org,sourceforge,radioparadise
general:
artifacts:
- check-links.txt
- check-unique.txt
- ab-results-check-homepages.txt.json
- ab-results-check-links.txt.json
deployment:
master:
branch: master