Fix "Tests" workflow
This commit is contained in:
parent
ab285ffcd4
commit
624de3b471
15
.github/workflows/pythonapp.yml
vendored
15
.github/workflows/pythonapp.yml
vendored
@ -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
|
name: Tests
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master, dev ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -12,18 +19,18 @@ jobs:
|
|||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.8
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.8
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install .
|
pip install -r requirements.txt
|
||||||
- name: Lint with flake8
|
- name: Lint with flake8
|
||||||
run: |
|
run: |
|
||||||
pip install flake8
|
pip install flake8
|
||||||
# stop the build if there are Python syntax errors or undefined names
|
# stop the build if there are Python syntax errors or undefined names
|
||||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
# 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
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
pip install pytest
|
pip install pytest
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
ProtoTorch is a PyTorch-based Python toolbox for bleeding-edge research in
|
ProtoTorch is a PyTorch-based Python toolbox for bleeding-edge research in
|
||||||
prototype-based machine learning algorithms.
|
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
|
## Description
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user