mirror of
https://github.com/sprockets/sprockets.mixins.http.git
synced 2024-11-14 11:19:28 +00:00
Replace travis with github actions
This commit is contained in:
parent
7aa980ccf7
commit
e6aa8acb0e
5 changed files with 68 additions and 30 deletions
20
.github/workflows/deploy.yaml
vendored
Normal file
20
.github/workflows/deploy.yaml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: Deployment
|
||||
on:
|
||||
push:
|
||||
branches-ignore: ["*"]
|
||||
tags: ["*"]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'sprockets/sprockets.mixins.http'
|
||||
container: python:3.9-alpine
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v1
|
||||
- name: Build package
|
||||
run: python3 setup.py bdist_wheel sdist
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_PASSWORD }}
|
43
.github/workflows/testing.yaml
vendored
Normal file
43
.github/workflows/testing.yaml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Testing
|
||||
on:
|
||||
push:
|
||||
branches: ["*"]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'setup.*'
|
||||
- '*.md'
|
||||
- '*.rst'
|
||||
tags-ignore: ["*"]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 3
|
||||
strategy:
|
||||
matrix:
|
||||
python: [3.7, 3.8, 3.9]
|
||||
container:
|
||||
image: python:${{ matrix.python }}-alpine
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install testing dependencies
|
||||
run: pip3 --no-cache-dir install -e . -r requires/testing.txt
|
||||
|
||||
- name: Run flake8 tests
|
||||
run: flake8
|
||||
|
||||
- name: Run tests
|
||||
run: coverage run
|
||||
|
||||
- name: Output coverage
|
||||
run: coverage report && coverage xml
|
||||
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v1.0.2
|
||||
if: github.event_name == 'push' && github.repository == 'sprockets/sprockets.mixins.http'
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: build/coverage.xml
|
||||
flags: unittests
|
||||
fail_ci_if_error: true
|
26
.travis.yml
26
.travis.yml
|
@ -1,26 +0,0 @@
|
|||
sudo: false
|
||||
language: python
|
||||
dist: xenial
|
||||
python:
|
||||
- 3.7
|
||||
- 3.8
|
||||
- 3.9
|
||||
install:
|
||||
- pip install -r requires/development.txt
|
||||
script:
|
||||
- flake8
|
||||
- yapf -dr sprockets tests.py
|
||||
- nosetests
|
||||
after_success:
|
||||
- codecov
|
||||
- ./setup.py build_sphinx
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: sprockets
|
||||
distributions: sdist bdist_wheel
|
||||
password:
|
||||
secure: "HncR2JUjQicR1czZfM2fHtlFc7rbc5DNdiBsu6uLvNVQPmdBC/fM+FAkuhXhCPrxgp8aRAKXX3mJebZK0R2NVJCui3Y20h4cmHAqTmkNchqytQVZEeDU9pxFYKZ6dhXb6dy6kq/nqxT4ZIDP6IeDaz7n03ZMlsNzMbt2Hj0b5E8BIghiaOLOIZVI3s4meOv/MGxZ5IL378ssKh/+X+mHa5JTVNoZ0gmlIM0Cq6enxQquPgPiL6c6R+EfEk7hbuIKlRwKLpves9qlAM9NCgOwGoo0lv0ashxmIGSbKQApyYtrLbGXmv1TnWAgM64uFTmR6KGKvmLnDD/avx6BCiI+0Fe1V+qDzdDaZf9A2ibPNIdSBR/bwJNueKgDm2yUvf67R0KoucsPnqxJjTObh7Uo/WShie9QjmBNh+FVeNMCPS7SumLeWK5utJx6IYlffuGaVM7VEaTuCahgLFLoYxN/Iig0REhAaG+bxDT+9jcRxgxNcUzTgrPC7TK/AwxfMIP+Ux+0j3M7bAByipek40VBFNI3VZFqfZYsgUl9/sm/ihRzENan6GeNevHx2IpvxnS9CNP0wuYBo4n8Rgvfl7ZMrUZxgl5gkXCnlAwt4Mow0/SNiuPFNqCJARt66w0KFKB5d2eLNgvowV3Mhsh+s3wWm3jxaY5KqBEtqGojQiBDYuk="
|
||||
on:
|
||||
python: 3.7
|
||||
tags: true
|
||||
repo: sprockets/sprockets.mixins.http
|
|
@ -2,7 +2,7 @@ sprockets.mixins.http
|
|||
=====================
|
||||
HTTP Client Mixin for Tornado RequestHandlers. Automatically retries on errors, sleep when rate limited, and handles content encoding and decoding using `MsgPack <https://msgpack.org>`_ and JSON.
|
||||
|
||||
|Version| |Travis| |CodeCov| |Docs|
|
||||
|Version| |Status| |CodeCov| |Docs|
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
@ -115,8 +115,9 @@ License
|
|||
.. |Version| image:: https://badge.fury.io/py/sprockets.mixins.http.svg?
|
||||
:target: https://badge.fury.io/py/sprockets.mixins.http
|
||||
|
||||
.. |Travis| image:: https://travis-ci.org/sprockets/sprockets.mixins.http.svg?branch=master
|
||||
:target: https://travis-ci.org/sprockets/sprockets.mixins.http
|
||||
.. |Status| image:: https://github.com/sprockets/sprockets.mixins.http/workflows/Testing/badge.svg?
|
||||
:target: https://github.com/sprockets/sprockets.mixins.http/actions?workflow=Testing
|
||||
:alt: Build Status
|
||||
|
||||
.. |CodeCov| image:: https://codecov.io/github/sprockets/sprockets.mixins.http/coverage.svg?branch=master
|
||||
:target: https://codecov.io/github/sprockets/sprockets.mixins.http?branch=master
|
||||
|
|
|
@ -8,7 +8,7 @@ include =
|
|||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
command_line = -m unittest discover tests --buffer --verbose
|
||||
command_line = -m unittest discover . --buffer --verbose
|
||||
|
||||
[flake8]
|
||||
application-import-names=sprockets.mixins.http
|
||||
|
|
Loading…
Reference in a new issue