.travis.yml
language: python
stages:
- name: test
- name: deploy
if: tag is present
cache: pip
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- pip install snakehouse satella
- pip install -r requirements.txt
- pip install -U pytest-xdist pytest-cov pytest pytest-forked pluggy py
- python setup.py install
jobs:
include:
- stage: test
python: "3.6"
script:
- pytest -n 8 --cov=smok --cov=ngtt
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.7"
script:
- pytest -n 8 --cov=smok --cov=ngtt
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.8"
script:
- pytest -n 8 --cov=smok --cov=ngtt
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.9"
script:
- pytest -n 8 --cov=smok --cov=ngtt
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: deploy
python: "3.8"
script:
- pip install wheel twine
- python setup.py bdist bdist_wheel
- twine upload -u $PYPI_USER -p $PYPI_PWD dist/*