Skip to content

Commit

Permalink
Migrate testing to gh-actions (#106)
Browse files Browse the repository at this point in the history
* Migrate to gh-actions

* Remove Travis from tox.ini

* Quote the pyton version

* Rename workflow

* Rename testing workflow

* Update tests badge in README

* Remove Travis from documentation

* Add Lint check
  • Loading branch information
hXtreme committed May 1, 2022
1 parent 2ea2e32 commit f6bb162
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 18 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/tox-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint using tox

name: tests

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

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

strategy:
max-parallel: 2
matrix:
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions flake8
- name: Lint
run: |
flake8 tasks3 tests
- name: Test with tox
run: |
tox
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 3.9, 3.10, and for PyPy. Check
https://travis-ci.com/hXtreme/tasks3/pull_requests
https://github.com/hXtreme/tasks3/actions/workflows/tox-test.yml
and make sure that the tests pass for all supported Python versions.

Tips
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ tasks3
.. image:: https://img.shields.io/pypi/v/tasks3.svg
:target: https://pypi.python.org/pypi/tasks3

.. image:: https://img.shields.io/travis/hXtreme/tasks3.svg
:target: https://travis-ci.com/hXtreme/tasks3
.. image:: https://github.com/hXtreme/tasks3/actions/workflows/tox-test.yml/badge.svg
:target: https://github.com/hXtreme/tasks3/actions/workflows/tox-test.yml

.. image:: https://readthedocs.org/projects/tasks3/badge/?version=latest
:target: https://tasks3.readthedocs.io/en/latest/?badge=latest
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist = py39, py310, flake8

[travis]
[gh-actions]
python =
3.9: py39
3.10: py310
Expand Down

0 comments on commit f6bb162

Please sign in to comment.