From 8169b4257a2164a598efa62c01797d8baf55cefc Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 3 Jun 2019 10:56:42 -0700 Subject: [PATCH] Fix drone and travis builds * 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 --- .drone.yml | 42 +++++++++++++++++++++++++++++++++++++---- .pre-commit-config.yaml | 2 ++ .travis.yml | 17 ++++++++--------- tests/minitor_test.py | 2 +- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index bbd02bd..ab582dc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,13 +1,17 @@ +--- +kind: pipeline +name: python-latest + workspace: base: /app path: . -pipeline: - test: +steps: + - name: test image: python:3 commands: - make test-env test - push_to_pypi: + - name: push to pypi image: python:3 commands: - make build-env upload @@ -18,7 +22,7 @@ pipeline: target: TWINE_PASSWORD when: event: tag - notify: + - name: notify image: drillster/drone-email host: $SMTP_HOST username: $SMTP_USER @@ -26,3 +30,33 @@ pipeline: from: drone@iamthefij.com when: 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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31823e8..b06f386 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,8 @@ repos: - id: flake8 language_version: python3 - id: check-yaml + args: + - --allow-multiple-documents - id: check-merge-conflict - id: name-tests-test exclude: tests/(common.py|util.py|(helpers|integration/factories)/(.+).py) diff --git a/.travis.yml b/.travis.yml index 8a9def1..a580c69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ -language: generic -before_install: - - sudo apt-get update -qq - - sudo apt-get install -qq python3.4 python3-pip python3.4-venv +dist: xenial +language: python +python: + - "3.4" + - "3.6" + - "3.7" install: - - python3 -m venv env - # travis had an issue... - - ./env/bin/pip install -U setuptools - - make test-env + - pip install tox script: - - make test + - tox diff --git a/tests/minitor_test.py b/tests/minitor_test.py index d55bc8d..5fa2c9e 100644 --- a/tests/minitor_test.py +++ b/tests/minitor_test.py @@ -25,7 +25,7 @@ class TestMinitor(object): 'AVAILABLE_NUMBER': '555-555-5050', 'MY_PHONE': '555-555-0505', 'ACCOUNT_SID': 'test-account-id', - 'ACCOUNT_TOKEN': 'test-account-token', + 'AUTH_TOKEN': 'test-account-token', }) args = '--config ./sample-config.yml'.split(' ') minitor = Minitor()