Skip to content

Commit

Permalink
Migrate to GH actions as travis continues to fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephrdev committed Oct 30, 2020
1 parent 846da5d commit cd89007
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 33 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tests

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
run-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8"]
django-version: ["1.11.0", "2.0.0", "2.1.0", "2.2.0"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Update pip and install requirements
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
pip install django~=${{ matrix.django-version }}
- name: Run tests for Python ${{ matrix.python-version }} -> Django ${{ matrix.django-version }}
run: |
py.test
coverage:
needs: run-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Setup virtual environment
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Make coverage
run: |
py.test --cov --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
26 changes: 26 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload to pypi.org

on:
release:
types: [created]

jobs:
release-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- 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/*
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

17 changes: 8 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
Generic linking for Django
==========================

.. image:: https://badge.fury.io/py/django-anylink.png
.. image:: https://badge.fury.io/py/django-anylink.svg
:target: http://badge.fury.io/py/django-anylink
:alt: Latest PyPI version

.. image:: https://travis-ci.org/moccu/django-anylink.png
:target: https://travis-ci.org/moccu/django-anylink
:alt: Latest Travis CI build status
.. image:: https://github.com/moccu/django-anylink/workflows/Tests/badge.svg?branch=master
:target: https://github.com/moccu/django-anylink/actions?query=workflow%3ATests
:alt: Latest GitHub Actions build status

.. image:: https://coveralls.io/repos/moccu/django-anylink/badge.svg
:target: https://coveralls.io/github/moccu/django-anylink
:alt: Coverage of master build
.. image:: https://codecov.io/gh/moccu/django-anylink/branch/master/graph/badge.svg
:target: https://codecov.io/gh/moccu/django-anylink
:alt: Coverage of master build

.. image:: https://readthedocs.org/projects/django-anylink/badge/?version=latest
:target: https://readthedocs.org/projects/django-anylink/?badge=latest
Expand All @@ -32,8 +32,7 @@ All documentation is in the "docs/source" directory and online at

Supported versions
------------------
The latest release of `django-anylink` works with Python 2.7 and Python 3.4-3.6,
and supports Django 1.11.
The latest release of `django-anylink` works with Python 3.6+ and supports Django 1.11.


License
Expand Down

0 comments on commit cd89007

Please sign in to comment.