Integrate CircleCI
This commit is contained in:
parent
6e9da9bece
commit
d8415de889
88
.circleci/config.yml
Normal file
88
.circleci/config.yml
Normal file
@ -0,0 +1,88 @@
|
||||
version: 2
|
||||
|
||||
test-template: &test-template
|
||||
working_directory: ~/Buku
|
||||
environment:
|
||||
CI_FORCE_TEST: 1
|
||||
steps:
|
||||
- run:
|
||||
command: |
|
||||
apt update && apt install -y --no-install-recommends git
|
||||
pip install --upgrade setuptools flake8 pylint
|
||||
- checkout
|
||||
- run:
|
||||
command: |
|
||||
pip install -e .[tests]
|
||||
pip install -r requirements.txt
|
||||
python3 -m flake8
|
||||
echo buku | xargs pylint --rcfile tests/.pylintrc
|
||||
find . -iname "*.py" ! -path "./api/*" | xargs pylint --rcfile tests/.pylintrc
|
||||
python3 -m pytest ./tests/test_*.py --cov buku -vv --durations=0
|
||||
|
||||
jobs:
|
||||
py34:
|
||||
docker:
|
||||
- image: python:3.4-slim
|
||||
<<: *test-template
|
||||
|
||||
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: ~/Buku
|
||||
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
|
||||
- py34
|
||||
- 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: /.*/
|
36
.travis.yml
36
.travis.yml
@ -1,36 +0,0 @@
|
||||
language: python
|
||||
python:
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
dist: trusty
|
||||
before_install:
|
||||
- "pip install --upgrade setuptools"
|
||||
- "pip install --upgrade pip"
|
||||
- "pip install -e .[tests]"
|
||||
install: "pip install -r requirements.txt"
|
||||
script:
|
||||
- python3 -m flake8
|
||||
- echo buku | xargs pylint --rcfile tests/.pylintrc
|
||||
- find . -iname "*.py" ! -path "./api/*" | xargs pylint --rcfile tests/.pylintrc
|
||||
- python3 -m pytest ./tests/test_*.py --cov buku -vv --durations=0
|
||||
before_deploy:
|
||||
- sudo apt-get update -qy
|
||||
- sudo apt-get install -qy python3 python3-pip
|
||||
- python3 -m pip install packagecore
|
||||
- packagecore -o dist/ "${TRAVIS_TAG#v}"
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: Zf+3StERDV9B0knxNj9UdiMv9kmrE9d80a27/e7IioZv6CUvCqbIpgzN5bD3yoTlJsHq3hY6BHF8OQpkH0B0pj3xwcxgcicwDdpGA9o43aIA+zqNSb6w1VHm784KZ+Z+z1NcVNEzCyIONXEIV0KRe73NUU/7Re6heA46lPDIMFF0EL8Fjv5tPb5VLq3z0jvA8mNlXfqiwtiWT/Zz7y6PvbKQZ5nSebK0WVBdGhuaQLj9EKNwdnxkgH3gsA1gAtiuaQdgDUxF69Xf5VY6hZPhdK5LSLl/5HDpandX9nLu5j3ZuSHn1pJWgdKw72aeWYSpKtgnBQ/uS5JLamqK31kHXfRVebp0uB2I1RBiLYhb5T0MO8BnFc6O+/f2qS7nQHGKZ9M+Mo+I+ceharLmCt7KfDA1yBP+AnwjsHYe1zgnGZfwSm+/ny1R1NoVmuyXPHkEDviOsT5JLSfLvuzCUstY4gsAYyXKHLDbHfMLxXQRRfK1RoJzR4taMntmsWsl2fIshzKujeck1o4wRu/FQIlq2ANYQVNrrcDSO+C5lZkSA8iivg7lIXk/n9Lxk7QcJkvrZkzOg0y9EKAejY87vejpessG1t2OD7GwUqWZMBBlPJXnbfTiUzTJqC+b8brwnAhu/QI8jMUvxWkTMO7XOiyZBpQljv2U9MwFNH8Ge4fwIag=
|
||||
file_glob: true
|
||||
file:
|
||||
- dist/*
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
repo: jarun/Buku
|
||||
python: "3.6"
|
@ -13,7 +13,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://repology.org/metapackage/buku"><img src="https://repology.org/badge/tiny-repos/buku.svg" alt="Availability"></a>
|
||||
<a href="https://travis-ci.org/jarun/Buku"><img src="https://img.shields.io/travis/jarun/Buku.svg" alt="Build Status" /></a>
|
||||
<a href="https://circleci.com/gh/jarun/workflows/Buku"><img src="https://img.shields.io/circleci/project/github/jarun/Buku.svg" alt="Build Status" /></a>
|
||||
<a href="http://buku.readthedocs.io/en/latest/?badge=latest"><img src="https://readthedocs.org/projects/buku/badge/?version=latest" alt="Docs Status" /></a>
|
||||
<a href="https://snyk.io/test/github/jarun/Buku"><img src="https://snyk.io/test/github/jarun/Buku/badge.svg" /></a>
|
||||
<a href="https://github.com/jarun/buku/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" /></a>
|
||||
|
Loading…
Reference in New Issue
Block a user