Skip to content

Commit

Permalink
Integrate CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Apr 4, 2019
1 parent 490c0ca commit e062a2c
Show file tree
Hide file tree
Showing 6 changed files with 275 additions and 197 deletions.
79 changes: 79 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,79 @@
version: 2

test-template: &test-template
working_directory: ~/pdd
environment:
CI_FORCE_TEST: 1
steps:
- run:
command: |
apt update && apt install -y --no-install-recommends git make
pip install --upgrade setuptools flake8 pylint python-dateutil logilab-common pytest
- checkout
- run:
command: |
python -m flake8 pdd
echo pdd | xargs pylint
make check
jobs:
py35:
docker:
- image: python:3.5-slim
<<: *test-template

py36:
docker:
- image: python:3.6-slim
<<: *test-template

py37:
docker:
- image: python:3.7-slim
<<: *test-template

package-and-publish:
machine: true
working_directory: ~/pdd
steps:
- checkout
- run:
name: "package with packagecore"
command: |
# Use latest installed python3 from pyenv
export PYENV_VERSION="$(pyenv versions | grep -Po '\b3\.\d+\.\d+' | tail -1)"
pip install packagecore
packagecore -o ./dist/ ${CIRCLE_TAG#v}
- run:
name: "publish to GitHub"
command: |
go get github.com/tcnksm/ghr
ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/
workflows:
version: 2

test:
jobs: &all-tests
- py35
- py36
- py37

nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs: *all-tests

publish-github-release:
jobs:
- package-and-publish:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
2 changes: 2 additions & 0 deletions .flake8
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 139
10 changes: 10 additions & 0 deletions .pylintrc
@@ -0,0 +1,10 @@
[MESSAGES CONTROL]
disable=
attribute-defined-outside-init,
broad-except,
invalid-name,
missing-docstring,
too-few-public-methods,
too-many-nested-blocks,
[FORMAT]
max-line-length=139
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -12,7 +12,7 @@
<p align="center">
<a href="https://repology.org/metapackage/pdd"><img src="https://repology.org/badge/tiny-repos/pdd.svg" alt="Availability"></a>
<a href="https://github.com/jarun/pdd/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" /></a>
<a href="https://travis-ci.org/jarun/pdd"><img src="https://travis-ci.org/jarun/pdd.svg?branch=master" alt="Build Status" /></a>
<a href="https://circleci.com/gh/jarun/workflows/pdd"><img src="https://img.shields.io/circleci/project/github/jarun/pdd.svg" alt="Build Status" /></a>
</p>

<p align="center">
Expand Down

0 comments on commit e062a2c

Please sign in to comment.