Skip to content

Darcy.rayner/add ci #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: 2.1

jobs:
verify_build:
working_directory: ~/repo
docker:
- image: circleci/python:<< parameters.python >>
parameters:
python:
type: string
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-<< parameters.python >>-{{ checksum "setup.py" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-<< parameters.python >>--
- run:
name: Install Dependencies
command: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install .[dev]
- run:
name: Run Unit Tests
command: |
source venv/bin/activate
nose2 -v
- run:
name: Lint
command: |
source venv/bin/activate
flake8 datadog_lambda/

- save_cache:
paths:
- ./venv
key: v1-dependencies-<< parameters.python >>-{{ checksum "setup.py" }}

workflows:
python-v2.7:
jobs:
- verify_build:
python: "2.7"

python-v3.6:
jobs:
- verify_build:
python: "3.6"

python-v3.7:
jobs:
- verify_build:
python: "3.7"