Skip to content

Commit

Permalink
Merge pull request #36 from twisted/copy-axiom-ga
Browse files Browse the repository at this point in the history
Copy Axiom's GA infrastructure
  • Loading branch information
mithrandi authored Aug 5, 2020
2 parents f86ffd3 + 2788a97 commit 0a6905f
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 2,250 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python package
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '44 5 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: [2.7, pypy2, 3.7, 3.8, pypy3]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: tox -e py
- name: Codecov
uses: codecov/codecov-action@v1
with:
name: gh-${{ matrix.python }}
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine pep517
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pep517.build --binary --source .
twine upload dist/*
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.8.0 (2020-08-05):
Major:

- Python 3 is now supported.

0.7.3 (2018-06-24):
Minor:

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Divmod Epsilon
==============
.. image:: https://travis-ci.org/twisted/epsilon.svg?branch=master
.. image:: https://github.com/twisted/epsilon/workflows/Python%20package/badge.svg
:target: https://travis-ci.org/twisted/epsilon
.. image:: https://img.shields.io/pypi/v/Epsilon
:alt: PyPI
Expand Down
12 changes: 5 additions & 7 deletions epsilon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# -*- test-case-name: epsilon.test -*-
from epsilon._version import get_versions
__version__ = get_versions()['version']
del get_versions

from twisted.python import versions
from epsilon._version import __version__

def asTwistedVersion(packageName, versionString):
from twisted.python import versions
import re
return versions.Version(
packageName, *map(int, versionString.split('+', 1)[0].split(".")))
packageName,
*map(int, re.match(r"[0-9.]*", versionString).group().split(".")[:3]))

version = asTwistedVersion("epsilon", __version__)

__all__ = ['__version__', 'version']
Loading

0 comments on commit 0a6905f

Please sign in to comment.