Fix "Tests" workflow

This commit is contained in:
blackfly 2020-04-06 17:42:29 +02:00
parent ab285ffcd4
commit 624de3b471
2 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,13 @@
# 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
name: Tests
on: [push]
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]
jobs:
build:
@ -12,18 +19,18 @@ jobs:
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
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=80 --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest

View File

@ -3,7 +3,7 @@
ProtoTorch is a PyTorch-based Python toolbox for bleeding-edge research in
prototype-based machine learning algorithms.
![Tests](https://github.com/si-cim/prototorch/workflows/Tests/badge.svg?branch=master)
![Tests](https://github.com/si-cim/prototorch/workflows/Tests/badge.svg)
## Description