prototorch/.github/workflows/pythonapp.yml

38 lines
1.1 KiB
YAML
Raw Normal View History

2020-04-06 15:42:29 +00: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
2020-04-08 20:34:26 +00:00
name: tests
2020-02-17 17:02:52 +00:00
2020-04-06 15:42:29 +00:00
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]
2020-02-17 17:02:52 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
2020-04-06 15:42:29 +00:00
python-version: 3.8
2020-02-17 17:02:52 +00:00
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2020-04-06 15:45:15 +00:00
pip install .
2020-02-17 17:02:52 +00:00
- 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
2020-04-06 15:42:29 +00:00
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2020-02-17 17:02:52 +00:00
- name: Test with pytest
run: |
pip install pytest
pytest