Skip to content

Commit

Permalink
Feature/travis support (#1)
Browse files Browse the repository at this point in the history
* adding travis support
* adding initial tests
* adding codecov support
  • Loading branch information
eamonnfaherty authored Apr 13, 2019
1 parent afad41c commit 99baffb
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ venv
ServiceCatalogPuppet/
aws_service_catalog_puppet.egg-info/
dist
__pycache__
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
git:
depth: 1
language: python
python:
- '3.6'
install:
- pip install -r servicecatalog_puppet/requirements.txt
- pip install .
script:
- pip install pytest==4.4.0
- pip install pytest-cov==2.6.1
- pip install codecov
- pytest --cov=./ servicecatalog_puppet
before_deploy:
- python setup.py sdist
deploy:
- provider: pypi
user:
secure: a8wokUSTZEg7t172kxMRvpoc9NJoTk+tuowBV7QMmKB7iuihbF2PKFvLr9nn7k6+IYRYRwpZLHTc55jeqAVkGBjlhstMfKop65ZoB/4Mn4biLVXoJkbsNTv9/AZ4C/sgIXU+cBym5mxh+UVmtvx7Ew5O1Qj06ze9dofTod0TDX5Y6qIPcRMkcK2WgGJuQYCgcP8rIMSHaIE9uHPK5bGJtONY9zsp6B4P5kW//zMGvaH8m56zYVtuta4G6BKKTnUtxNXZcb6KeHbyKQOiQe++4kDzNvQujkNUWuK2s5FIQzztNzRnqkTAjW4sEqRrv2kmvVLQc3MV6+iwAunBJNCusHgnvwhUl8O7Tnbkx9Ni1+HhaOqmQ4fud6jSsUBgNIDwVC3+Bky+BwESLhB9WVaB15Wqk9jV14yu69LaQaOjs4ZevDsDkcgAwzLFO5fATD7Fn/Cj+G1ZJXGS71vjgcfdJihG1h8gwZ3B5JzbLP01iWaGLyue54D+bPDWCRepnW4SShctyTkR7ju9Ss5wdN5M7BUeVUiUs3W6njKgO0+9TipydyVdIGN9bXDfOANJjblDDP+hcwAvgsbXiejUaHcAWP5KQTvc9O4y/IlKkdMgyYIR7jNR+NI3SgCjfID3h2YCDXGfZjvaYHjoo8WQ9Y+/YHZtr1rMhu91IwGzdy3KCfY=
password:
secure: lmR1xusOUDNUxUaWNzozykRT+TQXTzkTSYObdoejaQS+mLnqkBOY1QCQy8GqqO4midZXAeADEdp/CAHpcSa7VA5T/7rdBL/ynu/WLGFVH7piX1lhyXAOjptxm/fdOVFINX+AT8Is1qVs/FC7axYxV2uHt7mL44xjFXxFMTab8G3TDDgxtS3eaDTIRxHr/1MFRUelg4EH99wNdNaiCaRUPHMtj5wOIL2BE8zoJjZRGvAekwaQXsC/Aap8w2UIpPCwhcoT/dLZ9ClyBDb95IR9FlbUW0vzJ/0p1ek17uMiEYE2/qlx5A0nP2arlkV+SB9Pu/JCRBVrRGJhFSf1Ft9DQbx0fflyuZ898xO9v+gpUj4MSTJgw6i/ixt3cZqybCoDodBS9PAQ/+20FzU1YkcymAM4goN+EpD0BW/YCjsDzUQ90O6jVY+qqBwW9GUTTFeUli8+3Exw/C6qHGp5RAbFIT6ng+ma9HxU56tTz3DVMCUtzSxSfvNGGGwXg8kVYO07CTrDKT4vGb53+yvh40XkjlKQowSzBlxDnY2YOsMdHxQsBRCFaLGSktLZST2EweFITeFNl45LEYDO4vnd20L+85ymwtpLVuZ8VhQZ8dohVWYtvwcfMPTYAfA3W9EaEwk7Z96GXtew8yUgG7YjiVNgWmhRyp+3U5kRlfVJLSaBn2I=
skip_cleanup: true
distributions: sdist bdist_wheel
on:
tags: true
repo: awslabs/aws-service-catalog-puppet-framework
all_branches: true
after_success:
- codecov --token=${CODECOV_TOKEN}
22 changes: 22 additions & 0 deletions servicecatalog_puppet/cli_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from pytest import fixture
import pkg_resources

@fixture
def sut():
from servicecatalog_puppet import cli
return cli


def test_version(sut):
assert sut.VERSION == pkg_resources.require("aws-service-catalog-puppet")[0].version


def test_bootstrap_stack_name(sut):
assert sut.BOOTSTRAP_STACK_NAME == 'servicecatalog-puppet'


def test_service_catalog_factory_repo_name(sut):
assert sut.SERVICE_CATALOG_PUPPET_REPO_NAME == 'ServiceCatalogPuppet'

0 comments on commit 99baffb

Please sign in to comment.