aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2020-09-05 13:39:14 +0000
committernodiscc <nodiscc@gmail.com>2020-10-08 20:08:08 +0000
commit6825002c6cedf9fda6c6b1a9449e05c3df37c2ac (patch)
tree3f144f672f757c459e79efce4da7330023b66a5c /.travis.yml
parentupdate the travis CI links check badge to point to master branch (diff)
downloadawesome-selfhosted-6825002c6cedf9fda6c6b1a9449e05c3df37c2ac.tar.gz
awesome-selfhosted-6825002c6cedf9fda6c6b1a9449e05c3df37c2ac.zip
cleanup/streamline/improve automated checks:
- use a single .travis-ci.yml for all check types (syntax on whole file, syntax on diff/PR, full syntax + URL checks) - only check full file syntax on pushes to master - only check diff on pushes to branches/PRs - setup a weekly cron job on https://travis-ci.org/github/awesome-selfhosted/awesome-selfhosted/settings to run thee full test suite - define all tests in Makefile, let .travis-ci.yml hanlde travis-specific logic only - rename and document makefile targets - remove obselete.duplicate bash syntax checks - check github last commit dates on github.com repositories during full checks - simplify/cleanup 'make add' target
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml10
1 files changed, 6 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index ee19d90a..835b5f3a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,19 +2,21 @@ language: node_js
node_js:
- "node"
+
cache:
npm: false
before_install:
- rvm install 2.6.2
- gem install awesome_bot
+ - sudo apt update && sudo apt install python3-pip python3-setuptools
- cd tests && npm install chalk && cd ..
script:
- - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git diff origin/master -U0 README.md | grep -Pos "(?<=^\+).*" >> temp.md; fi || (exit 0)'
- - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then node tests/test.js -r README.md -d temp.md; else node tests/test.js -r README.md; fi'
- - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then awesome_bot temp.md --allow-redirect --skip-save-results --allow 202 --white-list airsonic.github.io/docs/apps; else (exit 0); fi'
- - 'if [ "$TRAVIS_BRANCH" == "monthly-check" ]; then awesome_bot *.md --allow-redirect --skip-save-results --allow 202 --white-list airsonic.github.io/docs/apps; fi'
+ - 'echo "DEBUG: $TRAVIS_BRANCH - $TRAVIS_EVENT_TYPE - $TRAVIS_PULL_REQUEST"'
+ - 'if [ "$TRAVIS_BRANCH" == "master" ]; then make check_syntax_full; fi'
+ - 'if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "cron" ]]; then make check_all; fi'
+ - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then make check_pr; fi'
notifications:
email: false