From 96c113b2c6e9a0428deb0743e369130971d6f4d5 Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Mon, 4 May 2020 09:13:54 +0200 Subject: rename files and add pull request for proper status in pr --- .github/workflows/build_tests.yml | 103 ++++++++++++++++++++++++++++++ .github/workflows/circleci-redirector.yml | 13 ++++ .github/workflows/main.yml | 13 ---- .github/workflows/pythonpackage.yml | 102 ----------------------------- 4 files changed, 116 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/build_tests.yml create mode 100644 .github/workflows/circleci-redirector.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/pythonpackage.yml diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml new file mode 100644 index 0000000..652655f --- /dev/null +++ b/.github/workflows/build_tests.yml @@ -0,0 +1,103 @@ +name: build + +on: + push: + branches: + - '**' + pull_request: + create: + branches: + - 'master' + tags: + - '**' + +jobs: + linux: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - 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 . + - name: Run tests + run: | + python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot + - name: Upload codecov + run: | + codecov + + + macos: + runs-on: macOS-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - 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 + + + windows: + runs-on: windows-2019 + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - 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 diff --git a/.github/workflows/circleci-redirector.yml b/.github/workflows/circleci-redirector.yml new file mode 100644 index 0000000..ae7bfca --- /dev/null +++ b/.github/workflows/circleci-redirector.yml @@ -0,0 +1,13 @@ +name: circleci-redirector +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/dev/index.html + circleci-jobs: build_docs diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index ae7bfca..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: circleci-redirector -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/dev/index.html - circleci-jobs: build_docs diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml deleted file mode 100644 index 0792059..0000000 --- a/.github/workflows/pythonpackage.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: build - -on: - push: - branches: - - '**' - create: - branches: - - 'master' - tags: - - '**' - -jobs: - linux: - - runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - python-version: [3.5, 3.6, 3.7, 3.8] - - steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - 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 . - - name: Run tests - run: | - python -m pytest -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot - - name: Upload codecov - run: | - codecov - - - macos: - runs-on: macOS-latest - strategy: - max-parallel: 4 - matrix: - python-version: [3.7] - - steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - 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 - - - windows: - runs-on: windows-2019 - strategy: - max-parallel: 4 - matrix: - python-version: [3.7] - - steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - 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 -- cgit v1.2.3