summaryrefslogtreecommitdiff
path: root/.github/workflows/pythonpackage.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/pythonpackage.yml')
-rw-r--r--.github/workflows/pythonpackage.yml24
1 files changed, 21 insertions, 3 deletions
diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index cb3baf8..c4b0165 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -1,6 +1,14 @@
name: Test Package
-on: [push]
+on:
+ push:
+ branches:
+ - '**'
+ create:
+ branches:
+ - 'master'
+ tags:
+ - '**'
jobs:
build:
@@ -9,7 +17,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: [2.7, 3.5, 3.6, 3.7]
+ python-version: [3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
@@ -21,10 +29,20 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
+ pip install flake8 pytest "pytest-cov<2.6" codecov
+ pip install -U "sklearn"
- 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: Install POT
+ run: |
+ pip install -e .
+ - name: Run tests
+ run: |
+ python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ - name: Upload codecov
+ run: |
+ codecov