Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Commit

Permalink
Add support for CircleCI
Browse files Browse the repository at this point in the history
Remove brew update command to speed up the build on Mac OS
Show python --version in build logs
  • Loading branch information
nbedos committed Nov 4, 2018
1 parent 69c953a commit 68e072e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .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
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions 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
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down

0 comments on commit 68e072e

Please sign in to comment.