Skip to content

Commit 5fcba53

Browse files
committed
ci workflow
1 parent 5d3d201 commit 5fcba53

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

.github/workflows/.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
relative_files = True

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: pynmea2
5+
on:
6+
push:
7+
branches: ["master"]
8+
pull_request:
9+
branches: ["master"]
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python: ["3"]
18+
os: ["ubuntu-latest"]
19+
include:
20+
- {python: "3.8", os: "ubuntu-22.04"}
21+
- {python: "3.9", os: "ubuntu-22.04"}
22+
- {python: "3.10", os: "ubuntu-22.04"}
23+
- {python: "3.11", os: "ubuntu-22.04"}
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up Python ${{ matrix.python }}
27+
uses: actions/setup-python@v3
28+
with:
29+
python-version: ${{ matrix.python }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
python -m pip install pytest
34+
python -m pip install flake8
35+
python -m pip install importlib_metadata
36+
- name: Lint with flake8
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
40+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics
41+
- name: Build and test
42+
run: |
43+
python setup.py sdist --formats=zip
44+
pip install dist/pynmea2*.zip
45+
pytest
46+
- name: Coveralls
47+
env:
48+
COVERAGE_RCFILE: ".github/workflows/.coveragerc"
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: |
51+
python -m pip install "coverage"
52+
python -m pip install "coveralls"
53+
coverage run --source=pynmea2 -m pytest
54+
python -m coveralls --service=github || true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `pynmea2` homepage is located at http://github.com/Knio/pynmea2
1212
`pynmea2` is compatable with Python 2.7 and Python 3.4+
1313

1414
![Python version](https://img.shields.io/pypi/pyversions/pynmea2.svg?style=flat)
15-
[![Build Status](https://www.travis-ci.com/Knio/pynmea2.svg?branch=master)](https://www.travis-ci.com/Knio/pynmea2)
15+
[![Build status](https://github.com/Knio/pynmea2/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Knio/pynmea2/actions/workflows/ci.yml?query=branch%3Amaster+)
1616
[![Coverage status](https://img.shields.io/coveralls/github/Knio/pynmea2/master.svg?style=flat)](https://coveralls.io/r/Knio/pynmea2?branch=master)
1717

1818
### Installation

0 commit comments

Comments
 (0)