Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tox to run for any algo #907

Merged
merged 2 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false

test-long:
test-algo:
needs: pretest
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
matrix:
platform: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9]
algo: [nevergrad]
env:
PLATFORM: ${{ matrix.platform }}
steps:
Expand All @@ -85,7 +86,7 @@ jobs:
pip install tox tox-gh-actions

- name: Test with tox
run: tox -e nevergrad
run: tox -e algo -- tests/unittests/algo/long/${{ matrix.algo }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand Down Expand Up @@ -184,7 +185,7 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false
pypi:
needs: [test, backward-compatibility, test-long]
needs: [test, backward-compatibility, test-algo]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -214,7 +215,7 @@ jobs:
user: __token__
password: ${{ secrets.pypi_password }}
conda:
needs: [test, backward-compatibility, test-long]
needs: [test, backward-compatibility, test-algo]
runs-on: ubuntu-latest
env:
ANACONDA_TOKEN: ${{ secrets.anaconda_token }}
Expand Down
12 changes: 5 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,25 @@ deps =
commands =
pip install -U {toxinidir}/tests/functional/gradient_descent_algo
coverage run --source=src --parallel-mode -m pytest --durations=50 --durations-min 1 -vv --timeout=360 \
--ignore tests/unittests/algo/nevergrad \
--ignore tests/unittests/algo/long \
--ignore tests/functional/backward_compatibility \
--ignore tests/stress {posargs}
coverage combine
coverage report -m
coverage xml


[testenv:nevergrad]
description = Run nevergrad integration testing
[testenv:algo]
description = Run long algo integration testing
usedevelop = true
setenv = COVERAGE_FILE=.coverage.{envname}
passenv = CI
extras =
test
nevergrad
all
deps =
coverage
commands =
coverage run --source=src --parallel-mode -m pytest --durations=50 --durations-min 1 -vv --timeout=360 \
tests/unittests/algo/nevergrad {posargs}
coverage run --source=src --parallel-mode -m pytest --durations=50 --durations-min 1 -vv --timeout=360 {posargs}
coverage combine
coverage report -m
coverage xml
Expand Down