Skip to content

Commit

Permalink
chore(launch): new shard for launch tests (#4427)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarpenning committed Nov 11, 2022
1 parent 27a13cc commit 6ed4569
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
17 changes: 16 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ jobs:
xdist:
type: integer
default: 6
test_path:
type: string
default: tests/unit_tests
docker:
- image: "python:<<parameters.python_version_major>>.<<parameters.python_version_minor>>"
- image: gcr.io/wandb-production/local-testcontainer:<< pipeline.parameters.wandb_server_tag >>
Expand Down Expand Up @@ -318,7 +321,7 @@ jobs:
command: |
CI_PYTEST_PARALLEL=<< parameters.xdist >> \
tox -v -e <<parameters.toxenv>> \
-- --wandb-server-tag << pipeline.parameters.wandb_server_tag >> tests/unit_tests
-- --wandb-server-tag << pipeline.parameters.wandb_server_tag >> << parameters.test_path >>
- save-test-results
# conditionally post a notification to slack if the job failed
- when:
Expand Down Expand Up @@ -1186,6 +1189,18 @@ workflows:
name: "unit-s_base_mock_server-lin-py<<matrix.python_version_major>><<matrix.python_version_minor>>"
toxenv: "py<<matrix.python_version_major>><<matrix.python_version_minor>>,covercircle"
#
# Unit tests with pytest on Linux, using real wandb server -- for launch (unit_tests/tests_launch)
#
- pytest:
matrix:
parameters:
python_version_major: [3]
python_version_minor: [8]
name: "unit-s_base-lin-pylaunch<<matrix.python_version_major>><<matrix.python_version_minor>>"
toxenv: "pylaunch<<matrix.python_version_major>><<matrix.python_version_minor>>,covercircle"
test_path: "tests/unit_tests/tests_launch"

#
# Functional tests with yea on Linux (base only)
#
- tox-base:
Expand Down
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ codecov:
# To calculate after_n_builds use
# ./tools/coverage-tool.py jobs | wc -l
# also change comment block after_n_builds just below
after_n_builds: 36
after_n_builds: 37
wait_for_ci: no

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: no
after_n_builds: 36
after_n_builds: 37

ignore:
- "wandb/vendor"
Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ norecursedirs =
tests/functional_tests
tests/standalone_tests
tests/unit_tests
tests/unit_tests/tests_*
tests/unit_tests_old/tests_*
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist=
mypy,
flake8,
docstrings,
py{36,37,38,39,launch},
py{36,37,38,39,launch,launch38},
func-s_{base,sklearn,metaflow,tf115,tf21,tf25,tf26,ray112,ray2,service,docs,
imports{1,2,3,4,5,6,7,8,9,10,11,12},noml,grpc}-py37,
standalone-{cpu,gpu,tpu,local}-py38,
Expand Down Expand Up @@ -38,19 +38,19 @@ deps =
bokeh # TODO: remove after conftest.py refactor
nbclient # TODO: remove after conftest.py refactor

[testenv:py{36,37,38,39,310,launch}]
[testenv:py{36,37,38,39,310,launch,launch38}]
deps =
{[unitbase]deps}
-r{toxinidir}/requirements_dev.txt
install_command =
py{36,37,38,39,launch}: pip install --timeout 600 --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
py{36,37,38,39,launch,launch38}: pip install --timeout 600 --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
passenv =
USERNAME
CI_PYTEST_SPLIT_ARGS
CI_PYTEST_PARALLEL
CI
setenv =
py{36,37,38,39,310,launch}: COVERAGE_FILE={envdir}/.coverage
py{36,37,38,39,310,launch,launch38}: COVERAGE_FILE={envdir}/.coverage
py{37,39}: WINDIR=C:\\Windows
# Pytorch installations on non-darwin need the `-f`
whitelist_externals =
Expand All @@ -65,6 +65,7 @@ commands =
mkdir -p test-results
py{36,37,38,39,310}: python -m pytest {env:CI_PYTEST_SPLIT_ARGS:} -n={env:CI_PYTEST_PARALLEL:10} --durations=20 --junitxml=test-results/junit.xml --cov-config=.coveragerc --cov --cov-report= --no-cov-on-fail {posargs:tests/}
pylaunch: python -m pytest {env:CI_PYTEST_SPLIT_ARGS:} -n={env:CI_PYTEST_PARALLEL:4} --durations=20 --junitxml=test-results/junit.xml --cov-config=.coveragerc --cov --cov-report= --no-cov-on-fail {posargs:tests/unit_tests_old/tests_launch/}
pylaunch38: python -m pytest {env:CI_PYTEST_SPLIT_ARGS:} -n={env:CI_PYTEST_PARALLEL:4} --durations=20 --junitxml=test-results/junit.xml --cov-config=.coveragerc --cov --cov-report= --no-cov-on-fail {posargs:tests/unit_tests/tests_launch/}

[testenv:unit-s_nb-py{36,37,38,39,310}]
deps =
Expand All @@ -75,7 +76,7 @@ deps =
whitelist_externals =
mkdir
setenv =
py{36,37,38,39,310,launch}: COVERAGE_FILE={envdir}/.coverage
py{36,37,38,39,310,launch,launch38}: COVERAGE_FILE={envdir}/.coverage
py{37}: WINDIR=C:\\Windows
s_nb: WB_UNIT_SHARD=s_nb
passenv =
Expand Down

0 comments on commit 6ed4569

Please sign in to comment.