Skip to content

Commit

Permalink
Configure GitHub actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Oct 4, 2021
1 parent 95d58a3 commit aa68ed2
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 39 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Python package

on: [push]

jobs:
test:
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, pypy3]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install build and test dependencies
run: pip install flake8 tox setuptools_scm==3.5.0
# TODO: Disabled because it finds many issues
#- name: Lint with flake8
# run: tox -e flake8
- name: Test with tox
# Run tox using the version of Python in PATH
run: tox -e py

build:
runs-on: ubuntu-18.04

needs: test

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install build dependencies
run: pip install setuptools_scm==3.5.0 wheel
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1.4
with:
user: __token__
# Token is set in project's settings
password: ${{ secrets.PYPI_API_TOKEN }}
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
setup_requires=['setuptools_scm >= 1.7.0'],
setup_requires=['setuptools_scm == 3.5.0'],
extras_require={
':python_version == "2.7"': 'typing',
':python_version == "3.3"': 'typing >= 3.5',
Expand Down
12 changes: 1 addition & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
[tox]
minversion = 2.5.0
envlist = {pypy3,py27,py34,py35,py36}-{typing}
envlist = {pypy3,py27,py34,py35,py36,py37,py38}-{typing}
skip_missing_interpreters = true

[travis]
python =
pypy3: pypy3
2.7: py27
3.4: py34
3.5.2: py35
3.5.3: py35
3.6: py36
3.7: py37

[testenv]
commands = python tests/test_typechecker.py

Expand Down

0 comments on commit aa68ed2

Please sign in to comment.