From f141b7ecec8f69db29fb3dcf1efd1d00d96db87d Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 10:53:59 +0200 Subject: add artifact redirect --- .github/workflows/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/main.yml (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ca10c8c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,12 @@ +on: [status] +jobs: + circleci_artifacts_redirector_job: + runs-on: ubuntu-latest + name: Run CircleCI artifacts redirector + steps: + - name: GitHub Action step + uses: larsoner/circleci-artifacts-redirector-action@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + artifact-path: 0/docs/build/html/index.html + circleci-jobs: build_doc -- cgit v1.2.3 From 8c6a976c9d1225e469e22f7ef1c700eaf1e08dd7 Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 11:00:24 +0200 Subject: try codecov setup --- .github/workflows/main.yml | 2 +- .travis.yml | 5 ++++- codecov.yml | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 codecov.yml (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca10c8c..1a8a759 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,4 +9,4 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} artifact-path: 0/docs/build/html/index.html - circleci-jobs: build_doc + circleci-jobs: build_docs diff --git a/.travis.yml b/.travis.yml index b9cc88f..3f63867 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ before_install: install: - pip install -r requirements.txt - pip install -U "numpy>=1.14" scipy # for numpy array formatting in doctests - - pip install flake8 pytest "pytest-cov<2.6" + - pip install flake8 pytest "pytest-cov<2.6" codecov - pip install -U "sklearn" - pip install . # command to run tests + check syntax style @@ -45,3 +45,6 @@ script: - flake8 examples/ ot/ test/ - python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot # - py.test ot test +after_script: + # Need to run from source dir to execute "git" commands + - codecov; diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..1e7b888 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +coverage: + precision: 2 + round: down + range: "70...100" + status: + project: + default: + target: auto + threshold: 0.01 + patch: false + changes: false +comment: + layout: "header, diff, sunburst, uncovered" + behavior: default -- cgit v1.2.3 From 555f8426a8cb66ae5255885ce555037dc8c72c53 Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 11:11:19 +0200 Subject: add codecov button --- .github/workflows/main.yml | 1 - README.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a8a759..6b52555 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,5 @@ jobs: - name: GitHub Action step uses: larsoner/circleci-artifacts-redirector-action@master with: - repo-token: ${{ secrets.GITHUB_TOKEN }} artifact-path: 0/docs/build/html/index.html circleci-jobs: build_docs diff --git a/README.md b/README.md index 931a252..64630e6 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![PyPI version](https://badge.fury.io/py/POT.svg)](https://badge.fury.io/py/POT) [![Anaconda Cloud](https://anaconda.org/conda-forge/pot/badges/version.svg)](https://anaconda.org/conda-forge/pot) [![Build Status](https://travis-ci.org/PythonOT/POT.svg?branch=master)](https://travis-ci.org/PythonOT/POT) +[![Codecov Status](https://codecov.io/gh/PythonOT/POT/branch/master/graph/badge.svg)](https://codecov.io/gh/PythonOT/POT) [![Documentation Status](https://readthedocs.org/projects/pot/badge/?version=latest)](http://pot.readthedocs.io/en/latest/?badge=latest) [![Downloads](https://pepy.tech/badge/pot)](https://pepy.tech/project/pot) [![Anaconda downloads](https://anaconda.org/conda-forge/pot/badges/downloads.svg)](https://anaconda.org/conda-forge/pot) -- cgit v1.2.3 From d3ebb36fc4a3614c5640d731ea793c0afd400e4e Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 11:23:34 +0200 Subject: run gh actions all the time --- .github/workflows/main.yml | 11 ++++++++++- .github/workflows/pythonpackage.yml | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b52555..46f278a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,13 @@ -on: [status] +on: + push: + branches: + - '**' + create: + branches: + - 'master' + tags: + - '**' + jobs: circleci_artifacts_redirector_job: runs-on: ubuntu-latest diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index cb3baf8..d728edd 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: -- cgit v1.2.3 From 624fd44c729a3b761d09a01b71338c0332b6b9fe Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 11:24:42 +0200 Subject: fix --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46f278a..07686d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,5 +16,6 @@ jobs: - name: GitHub Action step uses: larsoner/circleci-artifacts-redirector-action@master with: + repo-token: ${{ secrets.GITHUB_TOKEN }} artifact-path: 0/docs/build/html/index.html circleci-jobs: build_docs -- cgit v1.2.3 From 5c88642a27e6c330a5c795898c0de7f3b4c0cd8d Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 12:00:03 +0200 Subject: fix? --- .circleci/config.yml | 3 ++- .github/workflows/main.yml | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to '.github/workflows') diff --git a/.circleci/config.yml b/.circleci/config.yml index 455b700..ea5981e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -134,4 +134,5 @@ workflows: filters: branches: only: - - master + # - master + - doc_ci_build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07686d9..7153fe6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,13 +1,4 @@ -on: - push: - branches: - - '**' - create: - branches: - - 'master' - tags: - - '**' - +on: [status] jobs: circleci_artifacts_redirector_job: runs-on: ubuntu-latest @@ -17,5 +8,5 @@ jobs: uses: larsoner/circleci-artifacts-redirector-action@master with: repo-token: ${{ secrets.GITHUB_TOKEN }} - artifact-path: 0/docs/build/html/index.html + artifact-path: 0/dev/index.html circleci-jobs: build_docs -- cgit v1.2.3 From 8497cd523085ea69d949a0de67db252b36a81d8e Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 12:03:44 +0200 Subject: run tests in GH actions --- .github/workflows/pythonpackage.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index d728edd..d60acd2 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -29,10 +29,18 @@ 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: Run tests + run: | + pip install . + python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot + - name: Upload codecov + run: | + codecov -- cgit v1.2.3 From bdf608bfb417a15545d581aa2d57160401aacb6e Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Tue, 21 Apr 2020 12:09:53 +0200 Subject: fix? --- .github/workflows/pythonpackage.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index d60acd2..c4b0165 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -17,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 @@ -37,9 +37,11 @@ jobs: 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: | - pip install . python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot - name: Upload codecov run: | -- cgit v1.2.3