Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Github Actions #59

Merged
merged 3 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# Docs: https://coverage.readthedocs.org/en/latest/config.html

[run]
branch = False

# If True, stores relative file paths in data file (needed for Github Actions).
# Using this parameter requires coverage>=5.0
relative_files = True
62 changes: 62 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Tests

on:
push:
branches: [ master ]
paths-ignore:
- '.gitignore'
- '*.md'
- '*.rst'
- 'LICENSE'
- 'dev_requirements.txt'
pull_request:
branches: [ master ]
paths-ignore:
- '.gitignore'
- '*.md'
- '*.rst'
- 'LICENSE'
- 'dev_requirements.txt'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3]
steps:
- uses: actions/checkout@v2
- name: Set up Python Env
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
make init
- name: Run Tests
run: |
make test
- name: Upload to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "${{ matrix.os }}_${{ matrix.python-version }}"
run: |
coveralls --service=github

coveralls:
name: Finish Coveralls
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Install coveralls
run: |
pip3 install --upgrade coveralls
- name: Send coverage finish to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --finish
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ help:
@echo "$$HELPBODY"

init:
pip install -r requirements.txt
pip install -r dev_requirements.txt

test:
rm -f .coverage aprslib/*.pyc
nosetests --verbosity $(verbosity) --with-coverage --cover-package=aprslib
rm -f .coverage aprslib/*.pyc tests/*.pyc
PYTHONHASHSEED=0 pytest --tb=short --cov-config .coveragerc --cov=aprslib tests

pylint:
pylint -r n -f colorized aprslib || true
Expand Down
10 changes: 3 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
APRS library for Python
~~~~~~~~~~~~~~~~~~~~~~~

|pypi| |coverage| |scru| |master_build| |docs|
|pypi| |coverage| |master_build| |docs|

A python library for dealing with APRS.
It can be used to interact with APRS-IS servers, sending and receiving.
Expand Down Expand Up @@ -36,12 +36,8 @@ Contribution
:target: https://coveralls.io/r/rossengeorgiev/aprs-python?branch=master
:alt: Test coverage

.. |scru| image:: https://scrutinizer-ci.com/g/rossengeorgiev/aprs-python/badges/quality-score.png?b=master
:target: https://scrutinizer-ci.com/g/rossengeorgiev/aprs-python/?branch=master
:alt: Scrutinizer score

.. |master_build| image:: https://img.shields.io/travis/rossengeorgiev/aprs-python/master.svg?style=flat&label=master%20build
:target: http://travis-ci.org/rossengeorgiev/aprs-python
.. |master_build| image:: https://github.com/rossengeorgiev/aprs-python/workflows/Tests/badge.svg?branch=master
:target: https://github.com/rossengeorgiev/aprs-python/actions?query=workflow%3A%22Tests%22+branch%3Amaster
:alt: Build status of master branch

.. |docs| image:: https://readthedocs.org/projects/aprs-python/badge/?version=latest
Expand Down
9 changes: 9 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

mox3

coverage>=5.0; python_version == '2.7' or python_version >= '3.5'
pytest-cov>=2.7.0; python_version == '2.7' or python_version >= '3.5'

# coveralls 2.0 has removed support for Python 2.7 and 3.4
git+https://github.com/andy-maier/coveralls-python.git@andy/add-py27#egg=coveralls; python_version == '2.7'
coveralls>=2.1.2; python_version >= '3.5'
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_IS.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
import socket
import sys
import os
Expand Down
2 changes: 1 addition & 1 deletion tests/test_base91.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
import sys

from aprslib import base91
Expand Down
2 changes: 1 addition & 1 deletion tests/test_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from aprslib.exceptions import *

Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# encoding: utf-8

import sys
import unittest2 as unittest
import unittest
from mox3 import mox

from aprslib import parse
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse_comment_telemetry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from aprslib.parsing import parse_comment_telemetry
from aprslib import base91
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse_common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
import string
from random import randint, randrange, sample
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse_misc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from aprslib.parsing.misc import parse_status, parse_invalid, parse_user_defined

Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse_weather_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from aprslib.parsing import parse_weather_data
from aprslib.parsing import parse
Expand Down
2 changes: 1 addition & 1 deletion tests/test_passcode.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
from aprslib import passcode


Expand Down
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import unittest2 as unittest
import unittest

from aprslib import util

Expand Down