mirror of
https://github.com/awesome-selfhosted/awesome-selfhosted.git
synced 2025-06-17 12:37:25 +02:00
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
This commit is contained in:
parent
f7f8c55db7
commit
6825002c6c
2 changed files with 40 additions and 58 deletions
10
.travis.yml
10
.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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue