This commit is contained in:
Reuben Morais 2019-07-19 09:02:18 +02:00
Родитель 11e7895329
Коммит 4a24cff3a7
2 изменённых файлов: 26 добавлений и 10 удалений

Просмотреть файл

@ -1,17 +1,21 @@
language: python
git:
quiet: true
cache: pip
before_cache:
- rm ~/.cache/pip/log/debug.log
python:
- "3.6"
matrix:
include:
- name: "Lint check"
python: "3.6"
install: pip install --quiet --upgrade cardboardlint pylint
env: TEST_SUITE="lint"
- name: "Unit tests"
python: "3.6"
install: pip install --quiet -r requirements.txt
env: TEST_SUITE="unittest"
install:
- pip install --upgrade cardboardlint pylint
script:
# Run cardboardlinter, in case of pull requests
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
cardboardlinter --refspec $TRAVIS_BRANCH -n auto;
fi
script: ./.travis/script

12
.travis/script Executable file
Просмотреть файл

@ -0,0 +1,12 @@
#!/bin/bash
set -ex
if [[ ( "$TRAVIS_PULL_REQUEST" != "false" ) && ( "$TEST_SUITE" == "lint" ) ]]; then
# Run cardboardlinter, in case of pull requests
cardboardlinter --refspec $TRAVIS_BRANCH -n auto
fi
if [[ "$TEST_SUITE" == "unittest" ]]; then
# Run tests on all pushes
python -m unittest
fi