update python-package.yml

This commit is contained in:
Jack Robison 2020-10-30 15:22:38 -04:00
parent 52ac73bf57
commit f9635eee56
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1,4 +1,4 @@
name: Python package
name: CI
on:
push:
@ -7,13 +7,35 @@ on:
branches: [ master ]
jobs:
build:
code-quality:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy lxml flake8
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: mypy
run: |
mypy aioupnp
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
@ -23,15 +45,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy lxml coverage flake8
pip install coverage
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: mypy
run: |
mypy aioupnp
- name: Test with coverage
run: |
coverage run -m unittest discover -v tests