Skip to content

Commit

Permalink
Add basic GitHub Actions config
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Jul 22, 2020
1 parent 42c7fc1 commit b5f2cd6
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 29 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: main
on: [push, pull_request]

jobs:
linters:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testenv:
- flake8
- pylint
- pyroma
- check-manifest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install tox
- run: tox -e ${{ matrix.testenv }}

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, pypy3, 3.9-dev]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: tox -e py

deploy:
runs-on: ubuntu-latest
needs: [linters, tests]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Build package
run: |
python -m pip install --upgrade pip setuptools
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish package to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_token }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ __pycache__/
*.pyc
/pytest_mccabe.egg-info/
/venv/
/.venv/
/build/
/dist/
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

0 comments on commit b5f2cd6

Please sign in to comment.