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 23fbbc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 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-${{ matrix.algo }} -- tests/unittests/algo/${{ matrix.algo }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
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 23fbbc5

Please sign in to comment.