Fix drone and travis builds
All checks were successful
continuous-integration/drone/push Build is passing

* Correct env variable name in minitor_test
* Adding more test environments, skipping python 3.5
because lack of assert_called_once support
* Using default travis python environments
This commit is contained in:
IamTheFij 2019-06-03 10:56:42 -07:00
parent 0ea55fa7b3
commit 8169b4257a
4 changed files with 49 additions and 14 deletions

View File

@ -1,13 +1,17 @@
---
kind: pipeline
name: python-latest
workspace: workspace:
base: /app base: /app
path: . path: .
pipeline: steps:
test: - name: test
image: python:3 image: python:3
commands: commands:
- make test-env test - make test-env test
push_to_pypi: - name: push to pypi
image: python:3 image: python:3
commands: commands:
- make build-env upload - make build-env upload
@ -18,7 +22,7 @@ pipeline:
target: TWINE_PASSWORD target: TWINE_PASSWORD
when: when:
event: tag event: tag
notify: - name: notify
image: drillster/drone-email image: drillster/drone-email
host: $SMTP_HOST host: $SMTP_HOST
username: $SMTP_USER username: $SMTP_USER
@ -26,3 +30,33 @@ pipeline:
from: drone@iamthefij.com from: drone@iamthefij.com
when: when:
status: [ changed, failure ] status: [ changed, failure ]
---
kind: pipeline
name: python-3.6
workspace:
base: /app
path: .
steps:
- name: test
image: python:3.6
commands:
- make test-env test
---
kind: pipeline
name: python-3.7
workspace:
base: /app
path: .
steps:
- name: test
image: python:3.7
commands:
- make test-env test

View File

@ -13,6 +13,8 @@ repos:
- id: flake8 - id: flake8
language_version: python3 language_version: python3
- id: check-yaml - id: check-yaml
args:
- --allow-multiple-documents
- id: check-merge-conflict - id: check-merge-conflict
- id: name-tests-test - id: name-tests-test
exclude: tests/(common.py|util.py|(helpers|integration/factories)/(.+).py) exclude: tests/(common.py|util.py|(helpers|integration/factories)/(.+).py)

View File

@ -1,11 +1,10 @@
language: generic dist: xenial
before_install: language: python
- sudo apt-get update -qq python:
- sudo apt-get install -qq python3.4 python3-pip python3.4-venv - "3.4"
- "3.6"
- "3.7"
install: install:
- python3 -m venv env - pip install tox
# travis had an issue...
- ./env/bin/pip install -U setuptools
- make test-env
script: script:
- make test - tox

View File

@ -25,7 +25,7 @@ class TestMinitor(object):
'AVAILABLE_NUMBER': '555-555-5050', 'AVAILABLE_NUMBER': '555-555-5050',
'MY_PHONE': '555-555-0505', 'MY_PHONE': '555-555-0505',
'ACCOUNT_SID': 'test-account-id', 'ACCOUNT_SID': 'test-account-id',
'ACCOUNT_TOKEN': 'test-account-token', 'AUTH_TOKEN': 'test-account-token',
}) })
args = '--config ./sample-config.yml'.split(' ') args = '--config ./sample-config.yml'.split(' ')
minitor = Minitor() minitor = Minitor()