Skip to content

Commit

Permalink
Refactor tox to run for any algo
Browse files Browse the repository at this point in the history
  • Loading branch information
Delaunay committed May 3, 2022
1 parent cf2f370 commit e28d9f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
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/${{ 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
10 changes: 4 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,17 @@ commands =
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

0 comments on commit e28d9f4

Please sign in to comment.