Skip to content

Update circle 2 #338

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 5 commits into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
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
70 changes: 70 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
version: 2

jobs:
"python-2.7": &test-template
docker:
- image: circleci/python:2.7-stretch-browsers
environment:
REQUIREMENTS_FILE: dev-requirements.txt
PYLINTRC: .pylintrc

steps:
- checkout
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "dev-requirements.txt" }}

- run:
name: Install dependencies
command: |
sudo pip install virtualenv
python -m venv venv || virtualenv venv
. venv/bin/activate
pip install -r $REQUIREMENTS_FILE

- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "dev-requirements.txt" }}
paths:
- "venv"

- run:
name: Run lint
command: |
. venv/bin/activate
pylint dash setup.py --rcfile=$PYLINTRC
flake8 dash setup.py

- run:
name: Run tests
command: |
. venv/bin/activate
python --version
python -m unittest tests.development.test_base_component
python -m unittest tests.development.test_component_loader
python -m unittest tests.test_integration
python -m unittest tests.test_resources
python -m unittest tests.test_configs

"python-3.6":
<<: *test-template
docker:
- image: circleci/python:3.6-stretch-browsers
environment:
REQUIREMENTS_FILE: dev-requirements.txt
PYLINTRC: .pylintrc

"python-3.7":
<<: *test-template
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work getting this test-template stuff in. code is super DRY 🐫

docker:
- image: circleci/python:3.7-stretch-browsers
environment:
REQUIREMENTS_FILE: dev-requirements-py37.txt
PYLINTRC: .pylintrc37


workflows:
version: 2
build:
jobs:
- "python-2.7"
- "python-3.6"
- "python-3.7"
Loading