mirror of
https://github.com/sprockets/sprockets.mixins.avro-publisher.git
synced 2024-11-25 03:00:23 +00:00
Removed travis.yml and added testing.yaml & deploy.yaml
This commit is contained in:
parent
95f8f987ba
commit
607e9b42ac
3 changed files with 81 additions and 25 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.avro-publisher'
|
||||||
|
container: python:3.8-alpine
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Build package
|
||||||
|
run: python3 setup.py sdist
|
||||||
|
- name: Publish package
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_PASSWORD }}
|
61
.github/workflows/testing.yaml
vendored
Normal file
61
.github/workflows/testing.yaml
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
name: Testing
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["*"]
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'setup.*'
|
||||||
|
- '*.md'
|
||||||
|
- '*.rst'
|
||||||
|
tags-ignore: ["*"]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
rabbitmq:
|
||||||
|
image: rabbitmq:3.8
|
||||||
|
options: >-
|
||||||
|
--health-cmd "/opt/rabbitmq/sbin/rabbitmqctl node_health_check"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 10s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5672:5672
|
||||||
|
- 15672:15672
|
||||||
|
env:
|
||||||
|
AMQP_EXCHANGE: amq.topic
|
||||||
|
AMQP_URL: amqp://guest:guest@rabbitmq:5672/%2f
|
||||||
|
RABBIMQ_URL: http://guest:guest@rabbitmq:15672
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python: [3.7, 3.8]
|
||||||
|
container:
|
||||||
|
image: python:${{ matrix.python }}-alpine
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Install testing dependencies
|
||||||
|
run: pip3 install -r requires/testing.txt
|
||||||
|
|
||||||
|
- name: Install library dependencies
|
||||||
|
run: python3 setup.py develop
|
||||||
|
|
||||||
|
- name: Create build directory
|
||||||
|
run: mkdir -p build
|
||||||
|
|
||||||
|
- name: Run flake8 tests
|
||||||
|
run: flake8 --output build/flake8.txt --tee
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: coverage run
|
||||||
|
|
||||||
|
- name: Generate reports
|
||||||
|
run: coverage xml && coverage report
|
||||||
|
|
||||||
|
- name: Upload Coverage
|
||||||
|
uses: codecov/codecov-action@v1.0.2
|
||||||
|
if: github.repository == 'sprockets/sprockets.mixins.avro-publisher'
|
||||||
|
with:
|
||||||
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
|
file: build/coverage.xml
|
25
.travis.yml
25
.travis.yml
|
@ -1,25 +0,0 @@
|
||||||
language: python
|
|
||||||
python:
|
|
||||||
- 2.7
|
|
||||||
- pypy
|
|
||||||
- 3.4
|
|
||||||
- 3.7
|
|
||||||
- 3.8
|
|
||||||
services:
|
|
||||||
- rabbitmq
|
|
||||||
install:
|
|
||||||
- pip install -r requires/testing.txt -e .
|
|
||||||
script:
|
|
||||||
- nosetests
|
|
||||||
after_success:
|
|
||||||
- codecov
|
|
||||||
deploy:
|
|
||||||
provider: pypi
|
|
||||||
user: sprockets
|
|
||||||
password:
|
|
||||||
secure: TPpdlEbbxfjcFXR7KizRNiwqZDdB8C8/y0zE/nbFvlds1ZfdqRwCZJlvgsVwhUfiMrUfKiZ3sg1kSI6wN0Li8Z4DVe8RPyhnOXjml6DDao4iZ569LYEfqMdfWrp6NcN/+sMOpGlq5XuQMcdsy3P9uP8WGOUzRwjuQ0ny+2BN8yxD3TxY+TqgYo3FaCYwR0bp5u8l1pmX9gIbD8DhcbbC7EyO+/t8IZj4x5TxIQamIvhWyd8LIFpvR1FcCKRPbqu2x2fPZG4t6YwBHbcmLf8VnZx5xFGvOKEP9HaN4YkWtSIHQ/RhCuFslSPg4peHK3xgurDKMsXdvxnsV2AgSQBEQEaWt6ewACbM4nyW09K++LKK0F19U6keSzYgLZZK+Twsn02xhNpQf58k5kuAB0pJNm+EFxymUcJjR5g9gnVE2ln/Y3MkU1YhXRJGvo0hwdcytkDaPitIASuPC9buy/UQ8smzYPfA60PAF9Dl0/gq8lIWteq3u6PJQT+qtSobWwhR/nFYqTWDMk1sZu4sHVe1IPhSnJonlWccPe/AcS6qG8QNUt5n4fC1l5rerfsiplo+aSLH8gb6p5eiueBAXGwH/akZa6nb9hs1gFFZicHlCzMXlvA845qiLBHbj1ABNJri8jnRvtNxNcYdqBu73lkhExIHlsIG8sgRw93bN1ys73A=
|
|
||||||
on:
|
|
||||||
python: 3.4
|
|
||||||
distributions: sdist bdist_wheel
|
|
||||||
tags: true
|
|
||||||
all_branches: true
|
|
Loading…
Reference in a new issue