Skip to content

Commit

Permalink
GitHub Actions (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmumi authored May 10, 2021
1 parent a401688 commit 9c8d540
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 32 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/non-test-tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Coverage, mypi

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: tox -e coverage-py37,mypy-py37
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
23 changes: 23 additions & 0 deletions .github/workflows/tox-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tox Tests

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python: [3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
# Run tox using the version of Python in `PATH`
run: tox -e py-asyncio,py-tornado
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
.. image:: https://readthedocs.org/projects/memoize/badge/?version=latest
:target: https://memoize.readthedocs.io/en/latest/?badge=latest

.. image:: https://travis-ci.com/DreamLab/memoize.svg?token=PCPPzZaRDc9FFFUfKaj9&branch=master
:target: https://travis-ci.com/DreamLab/memoize
.. image:: https://github.com/DreamLab/memoize/actions/workflows/tox-tests.yml/badge.svg
:target: https://github.com/DreamLab/memoize/actions/workflows/tox-tests.yml

.. image:: https://github.com/DreamLab/memoize/actions/workflows/non-test-tox.yml/badge.svg
:target: https://github.com/DreamLab/memoize/actions/workflows/non-test-tox.yml

Extended docs (including API docs) available at `memoize.readthedocs.io <https://memoize.readthedocs.io>`_.

Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[tox]
skipdist = True
envlist = py{35,36,37,38,39}-{asyncio,tornado},coverage-py37,mypy-py37

# py-{asyncio,tornado} are added for GitHub Actions (where we have only one interpreter at the time)
# py{35,36,37,38,39}-{asyncio,tornado} are added for development purposes (where one has multiple interpreters)
envlist = py-{asyncio,tornado},py{35,36,37,38,39}-{asyncio,tornado},coverage-py37,mypy-py37

[testenv]
setenv =
Expand Down

0 comments on commit 9c8d540

Please sign in to comment.