.travis.yml
language: python
env:
global:
- GH_COMPANY=$GH_COMPANY
- GH_USER=$GH_USER
- GH_EMAIL=$GH_EMAIL
- NAME_REPO=$NAME_REPO
- GH_REPO="github.com/${GH_COMPANY}/${NAME_REPO}.git"
python:
- "3.7"
- "3.8"
branches:
except:
- experimental
install:
- pip install pytest
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
- gem install travis
- travis encrypt SECURE_GH_TOKEN=${GH_TOKEN} --add --repo ${GH_COMPANY}/${NAME_REPO} --org
- git config --global user.email ${GH_EMAIL};
- git config --global user.name ${GH_USER};
- git config credential.helper "store --file=.git/credentials"
- echo "https://${SECURE_GH_TOKEN}:@github.com" > .git/credentials
- git remote set-url origin https://${GH_TOKEN}@${GH_REPO};
script:
- pytest
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT