Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
275 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length = 139 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.