Files
manticore/.travis.yml
T
Eric Hennenfent 451965f03a Blacken Manticore (#1438)
* Add black to CI tests

I'd rather have blackening be an optional check, but this will work for now

* Yep, messed up Travis

Again, sorry about the commit spam

* Bump accepted line length to 120

Going to auto-format at 100 but will allow 20% overruns

* Blacken

* Cap line length at 100

rip my undisciplined coding habits

* update black on the fly if necessary

* Ignore CC errors

* Only check modified files

* Only python files

* Re-blacken post merge

* Re-Blacken

* Fix deleted files

* Explicitly invoke python

The +x must not have gotten commited

* Forgot to blacken again

Hoisted on my own petard

* Re-blacken
2019-05-23 15:19:24 -05:00

67 lines
1.6 KiB
YAML

dist: trusty
sudo: required
os:
- linux
language: python
python:
- 3.6.6
stages:
- format
- prepare
- test
- submit
env:
global:
- CC_TEST_REPORTER_ID=db72f1ed59628c16eb0c00cbcd629c4c71f68aa1892ef42d18c7c2b8326f460a
- JOB_COUNT=4 # Four jobs generate test coverage: ethereum, ethereum_vm, native, and other
- PYTHONWARNINGS="default::ResourceWarning" # Enable ResourceWarnings
matrix:
- TEST_TYPE=examples
- TEST_TYPE=ethereum
- TEST_TYPE=ethereum_vm
- TEST_TYPE=native
- TEST_TYPE=other
branches:
only:
- master
- /^(?!wip-).+$/
cache:
pip: true
directories:
- $HOME/virtualenv/python3.6.6/lib/python3.6/site-packages
- $HOME/virtualenv/python3.6.6/bin/
jobs:
include:
- stage: format
env: TEST_TYPE=format
script:
- git diff --name-only $TRAVIS_COMMIT_RANGE | python3 scripts/pyfile_exists.py | xargs black -t py36 -l 100 --check
- stage: prepare
env: TEST_TYPE=env
script:
- ./cc-test-reporter before-build
after_success:
- stage: submit
env: TEST_TYPE=env
script:
- true
after_script:
- aws s3 sync "s3://manticore-testdata/coverage/$TRAVIS_COMMIT" coverage/
- ./cc-test-reporter sum-coverage --output - --parts $JOB_COUNT coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --input -
install:
- scripts/travis_install.sh $TEST_TYPE
script:
- travis_wait 60 scripts/travis_test.sh $TEST_TYPE
after_success:
- ./cc-test-reporter format-coverage -t coverage.py -o "coverage/codeclimate.$TEST_TYPE.json"
- aws s3 sync coverage/ "s3://manticore-testdata/coverage/$TRAVIS_COMMIT"