Skip to content

Commit

Permalink
Merge pull request #7 from jumptrading/ci
Browse files Browse the repository at this point in the history
move tests from travis-ci to github actions
  • Loading branch information
wimglenn authored Jul 16, 2021
2 parents d91dbd3 + 10fea55 commit e26c0f9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 40 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: tests

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

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"

strategy:
matrix:
python-version: ["2.7", "3.9"]

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m pip install -e .[dev]
- name: "Run tests for ${{ matrix.python-version }}"
run: python -m pytest

- name: Upload coverage to Codecov
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
luddite
=======

|travis|_ |coveralls|_ |pypi|_ |pyversions|_
|actions|_ |codecov|_ |pypi|_ |pyversions|_

.. |travis| image:: https://img.shields.io/travis/jumptrading/luddite.svg?branch=master
.. _travis: https://travis-ci.org/jumptrading/luddite
.. |actions| image:: https://github.com/jumptrading/luddite/actions/workflows/tests.yml/badge.svg
.. _actions: https://github.com/jumptrading/luddite/actions/workflows/tests.yml/

.. |coveralls| image:: https://img.shields.io/coveralls/jumptrading/luddite.svg
.. _coveralls: https://coveralls.io/github/jumptrading/luddite?branch=master
.. |codecov| image:: https://codecov.io/gh/jumptrading/luddite/branch/master/graph/badge.svg
.. _codecov: https://codecov.io/gh/jumptrading/luddite

.. |pypi| image:: https://img.shields.io/pypi/v/luddite.svg
.. _pypi: https://pypi.org/project/luddite/
Expand Down
2 changes: 1 addition & 1 deletion luddite.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def __init__(self, text, line_number=None):
if self.stripped:
try:
self.req = Requirement.parse(self.stripped)
except RequirementParseError:
except (RequirementParseError, ValueError):
pass
else:
if len(self.req.specs) == 1:
Expand Down

0 comments on commit e26c0f9

Please # to comment.