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

38 lines
1.1 KiB
YAML
Raw Normal View History

2020-02-20 13:59:00 -05:00
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2019-09-04 13:32:35 -04:00
name: Python application
2020-02-12 13:26:01 -05:00
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
2019-09-04 13:32:35 -04:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2019-12-24 14:22:22 -08:00
- uses: actions/checkout@v2
2019-11-03 14:41:39 +01:00
- name: Set up Python 3.8
2019-09-04 13:32:35 -04:00
uses: actions/setup-python@v1
with:
2019-11-03 14:41:39 +01:00
python-version: 3.8
2019-09-04 13:32:35 -04: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
- name: Test with pytest
run: |
pip install pytest
pytest