summaryrefslogtreecommitdiff
path: root/.github/workflows/build_tests.yml
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2021-11-09 17:05:13 +0100
committerGard Spreemann <gspr@nonempty.org>2021-11-09 17:05:13 +0100
commita9fdc844907decddf54bed3ebeea8d8b2cf0fc5c (patch)
tree449a03fce8fafb78b6badd12b6e633f1e5d73a64 /.github/workflows/build_tests.yml
parenta16b9471d7114ec08977479b7249efe747702b97 (diff)
parentf1628794d521a8dfa00af383b5e06cd6d34af619 (diff)
Merge tag '0.8.0' into dfsg/latest
Diffstat (limited to '.github/workflows/build_tests.yml')
-rw-r--r--.github/workflows/build_tests.yml97
1 files changed, 54 insertions, 43 deletions
diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml
index 41b08b3..ee5a435 100644
--- a/.github/workflows/build_tests.yml
+++ b/.github/workflows/build_tests.yml
@@ -1,10 +1,13 @@
-name: build
+name: Tests
on:
- push:
-
+ workflow_dispatch:
pull_request:
-
+ branches:
+ - 'master'
+ push:
+ branches:
+ - 'master'
create:
branches:
- 'master'
@@ -15,10 +18,11 @@ jobs:
linux:
runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.5, 3.6, 3.7, 3.8]
+ python-version: [ "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -26,63 +30,70 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+ - name: Install POT
+ run: |
+ pip install -e .
- name: Install dependencies
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: |
- # 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 examples/ ot/ test/ --count --max-line-length=127 --statistics
- - name: Install POT
- run: |
- pip install -e .
+ pip install pytest "pytest-cov<2.6" codecov
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
- name: Upload codecov
run: |
codecov
+ pep8:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, 'no pep8')"
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.9
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8
+ - name: Lint with flake8
+ run: |
+ # 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 examples/ ot/ test/ --count --max-line-length=127 --statistics
linux-minimal-deps:
runs-on: ubuntu-latest
- strategy:
- max-parallel: 4
- matrix:
- python-version: [3.6]
-
+ if: "!contains(github.event.head_commit.message, 'no ci')"
steps:
- uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
+ - name: Set up Python
uses: actions/setup-python@v1
with:
- python-version: ${{ matrix.python-version }}
+ python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r .github/requirements_strict.txt
pip install pytest
- pip install -U "sklearn"
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --ignore ot/gpu/
+ python -m pytest --durations=20 -v test/ ot/ --ignore ot/gpu/ --color=yes
macos:
- runs-on: macOS-latest
+ runs-on: macos-latest
+ if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.7]
+ python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -90,26 +101,26 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+ - name: Install POT
+ run: |
+ pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest "pytest-cov<2.6"
- pip install -U "sklearn"
- - name: Install POT
- run: |
- pip install -e .
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
windows:
- runs-on: windows-2019
+ runs-on: windows-latest
+ if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
- python-version: [3.7]
+ python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v1
@@ -117,15 +128,15 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
+ - name: Install POT
+ run: |
+ python -m pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install pytest "pytest-cov<2.6"
- pip install -U "sklearn"
- - name: Install POT
- run: |
- pip install -e .
+ python -m pip install -r .github/requirements_test_windows.txt
+ python -m pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
+ python -m pip install pytest "pytest-cov<2.6"
- name: Run tests
run: |
- python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot
+ python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes