diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 49d61b2..4d764d7 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -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 diff --git a/README.md b/README.md index 8dbf966..45cab6e 100644 --- a/README.md +++ b/README.md @@ -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