diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..c348b23 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,30 @@ +version: 2 +workflows: + version: 2 + test: + jobs: + - Python-3.5 + - Python-3.6 + - Python-3.7 +jobs: + Python-3.7: &template + docker: + - image: circleci/python:3.7-stretch + + working_directory: ~/repo + steps: + - checkout + - run: + name: run tests + command: | + make tests + + Python-3.6: + <<: *template + docker: + - image: circleci/python:3.6-jessie + + Python-3.5: + <<: *template + docker: + - image: circleci/python:3.5-jessie diff --git a/.travis.yml b/.travis.yml index 3716284..5a60145 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,11 +14,11 @@ jobs: language: generic before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew upgrade python && pip3 install --upgrade pip setuptools wheel; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install --upgrade pip setuptools wheel; fi install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip3 install -U -e .[dev]; else pip install -U -e .[dev]; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 freeze; else pip freeze; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python3 --version && pip3 freeze; else python --version && pip freeze; fi script: - coverage run --branch --source termtosvg -m unittest -v diff --git a/Makefile b/Makefile index 77acacb..0d47ee0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .PHONY: usage tests venv_dev build deploy_test deploy_prod static man + VENV_PATH=.venv VENV_ACTIVATE=. $(VENV_PATH)/bin/activate EXAMPLES_DIR=examples @@ -30,14 +31,14 @@ deploy_prod: build $(VENV_ACTIVATE) && \ twine upload -r pypi dist/* -tests: venv_dev man +tests: venv_dev $(VENV_ACTIVATE) && \ pip freeze && \ coverage run --branch --source termtosvg -m unittest -v && \ coverage report && \ coverage html -$(VENV_ACTIVATE) && \ - pylint --extension-pkg-whitelist lxml termtosvg/*.py + pylint -j 0 --extension-pkg-whitelist lxml termtosvg/*.py venv_dev: setup.py (test -d $(VENV_PATH) || python -m venv $(VENV_PATH)) diff --git a/README.md b/README.md index 359917e..32010c5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/nbedos/termtosvg.svg?branch=master)](https://travis-ci.org/nbedos/termtosvg) +[![Build Status](https://travis-ci.org/nbedos/termtosvg.svg?branch=master)](https://travis-ci.org/nbedos/termtosvg) [![CircleCI](https://circleci.com/gh/nbedos/termtosvg.svg?style=svg)](https://circleci.com/gh/nbedos/termtosvg) # termtosvg termtosvg is a Unix terminal recorder written in Python that renders your command