mirror of
https://github.com/sprockets/sprockets.http.git
synced 2024-11-14 11:19:26 +00:00
Use GitHub Actions
This commit is contained in:
parent
8c5633eb6c
commit
57639aa64a
3 changed files with 63 additions and 26 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.http'
|
||||
container: python:3.9-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 }}
|
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@v1
|
||||
|
||||
- name: Install testing dependencies
|
||||
run: pip3 --no-cache-dir install -r requires/development.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.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 @@
|
|||
language: python
|
||||
os: linux
|
||||
dist: xenial
|
||||
python:
|
||||
- 3.5
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
install:
|
||||
- pip install -r requires/development.txt codecov
|
||||
script:
|
||||
- nosetests --with-coverage
|
||||
- python setup.py build_sphinx
|
||||
- flake8
|
||||
after_success:
|
||||
- codecov
|
||||
deploy:
|
||||
distributions: sdist bdist_wheel
|
||||
provider: pypi
|
||||
username: sprockets
|
||||
password:
|
||||
secure: ARvFw5CHqQZqPOkJXxQSe7EAEbX1yt7FiBTtzz8Gd6XndbY10HVCSWhGYeldm9LevvQc9p77pBEvsl+bXGQbJ3NW/r/U5PADaFdmi4bxmXN8yc+dFKzn72MpZfL+kCV2T/HutuOY6dQa4okTkKVV+sqwPLKPhL69zH/PxQg8qe4=
|
||||
on:
|
||||
python: 3.7
|
||||
tags: true
|
||||
all_branches: true
|
Loading…
Reference in a new issue