Files
starter-workflows/ci/python-package.yml
T

35 lines
1021 B
YAML
Raw Normal View History

2019-07-29 09:38:23 -07:00
name: Python package
2019-08-06 16:37:30 -07:00
on: [push]
2019-07-29 09:38:23 -07:00
2019-08-06 16:37:30 -07:00
jobs:
2019-07-29 09:38:23 -07:00
build:
2019-08-06 16:37:30 -07:00
2019-07-29 09:38:23 -07:00
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
2019-08-06 16:37:30 -07:00
steps:
2019-08-14 10:43:09 -04:00
- uses: actions/checkout@v1
2019-07-29 09:38:23 -07:00
- name: Set up Python ${{ matrix.python-version }}
2019-08-02 10:30:20 -04:00
uses: actions/setup-python@v1
2019-07-29 09:38:23 -07:00
with:
2019-08-14 14:05:28 -04:00
python-version: ${{ matrix.python-version }}
2019-07-29 09:38:23 -07:00
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2019-07-29 09:38:23 -07:00
- name: Test with pytest
run: |
pip install pytest
pytest