Skip to content

Commit

Permalink
Replace Travis with GitHub actions and use Poetry.
Browse files Browse the repository at this point in the history
The Python ecosystem has moved on a bit since I last touched this
project. It no longer makes sense to support Python 2 and type hints are
becoming more common. This is the first commit towards that.
  • Loading branch information
runfalk committed Jun 16, 2022
1 parent db18d6d commit 94ed4e3
Show file tree
Hide file tree
Showing 12 changed files with 708 additions and 736 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
# This avoids having duplicate builds for a pull request
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
name: Pytest (${{ matrix.python-version }}, ${{ matrix.os }})
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.13
# Remove the lock file unless we're using the stable version of Python.
# This is required because older Python version require "polyfills" for
# some libraries
- name: Remove poetry.lock file
run: rm poetry.lock
if: ${{ matrix.python-version != '3.10' }}
- name: Install dev dependencies
run: poetry install
- name: Run pytest
run: poetry run pytest

docs:
runs-on: ubuntu-latest
name: Documentation
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.13
- name: Install dev dependencies
run: poetry install
- name: Build documentation
run: |
poetry run sphinx-build -b html doc doc-build
touch doc-build/.nojekyll
- name: Deploy
uses: crazy-max/ghaction-github-pages@v3
if: github.ref == 'refs/heads/master'
with:
allow_empty_commit: false
build_dir: doc-build/
committer_name: Andreas Runfalk
committer_email: andreas@runfalk.se
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions MANIFEST.in

This file was deleted.

42 changes: 0 additions & 42 deletions Makefile

This file was deleted.

17 changes: 1 addition & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Spans
=====
|test-status| |test-coverage| |documentation-status| |pypi-version| |py-versions| |license|
|pypi-version| |py-versions| |license|

Spans is a pure Python implementation of PostgreSQL's
`range types <http://www.postgresql.org/docs/9.6/static/rangetypes.html>`_.
Expand Down Expand Up @@ -100,21 +100,6 @@ Pull requests are credited in the change log which is displayed on PyPI and the
documentaion on Read the Docs.


.. |test-status| image:: https://travis-ci.org/runfalk/spans.svg
:alt: Test status
:scale: 100%
:target: https://travis-ci.org/runfalk/spans

.. |test-coverage| image:: https://codecov.io/github/runfalk/spans/coverage.svg?branch=master
:alt: Test coverage
:scale: 100%
:target: https://codecov.io/github/runfalk/spans?branch=master

.. |documentation-status| image:: https://readthedocs.org/projects/spans/badge/
:alt: Documentation status
:scale: 100%
:target: http://spans.readthedocs.org/en/latest/

.. |pypi-version| image:: https://badge.fury.io/py/Spans.svg
:alt: PyPI version status
:scale: 100%
Expand Down
192 changes: 0 additions & 192 deletions doc/Makefile

This file was deleted.

0 comments on commit 94ed4e3

Please sign in to comment.