Skip to content

Commit

Permalink
consistent calling
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Jun 13, 2022
1 parent b2d3262 commit 6600ae0
Show file tree
Hide file tree
Showing 20 changed files with 265 additions and 93 deletions.
19 changes: 14 additions & 5 deletions ci/github/integration-testing/director-v2.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ install() {

test() {
echo "testing in services/director-v2/tests/integration/$1"
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_director_v2 --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" "services/director-v2/tests/integration/$1" --log-level=DEBUG
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_director_v2 \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--log-level=DEBUG \
--verbose \
-m "not heavy_load" \
"services/director-v2/tests/integration/$1"
}

clean_up() {
Expand Down
19 changes: 14 additions & 5 deletions ci/github/integration-testing/simcore-sdk.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_sdk --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" packages/simcore-sdk/tests/integration --log-level=DEBUG
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_sdk \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--log-level=DEBUG \
--verbose \
-m "not heavy_load" \
packages/simcore-sdk/tests/integration
}

clean_up() {
Expand Down
18 changes: 13 additions & 5 deletions ci/github/integration-testing/webserver.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_webserver --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" "services/web/server/tests/integration/$1"
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_webserver \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
"services/web/server/tests/integration/$1"
}

clean_up() {
Expand Down
18 changes: 13 additions & 5 deletions ci/github/unit-testing/api-server.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_api_server --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" services/api-server/tests/unit
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_api_server \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
services/api-server/tests/unit
}

# Check if the function exists (bash specific)
Expand Down
7 changes: 5 additions & 2 deletions ci/github/unit-testing/api.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ install() {
}

test() {
pytest --durations=10 \
-v -m "not travis" api/tests
pytest \
--durations=10 \
--verbose \
-m "not heavy_load" \
api/tests
}

# Check if the function exists (bash specific)
Expand Down
18 changes: 13 additions & 5 deletions ci/github/unit-testing/catalog.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_catalog --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" services/catalog/tests/unit
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_catalog \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
services/catalog/tests/unit
}

# Check if the function exists (bash specific)
Expand Down
18 changes: 13 additions & 5 deletions ci/github/unit-testing/dask-sidecar.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_dask_sidecar --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v services/dask-sidecar/tests/unit
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_dask_sidecar \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
services/dask-sidecar/tests/unit
}

# Check if the function exists (bash specific)
Expand Down
3 changes: 3 additions & 0 deletions ci/github/unit-testing/dask-task-models-library.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ test() {
--cov-report=xml \
--cov=dask_task_models_library \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
packages/dask-task-models-library/tests
}

Expand Down
17 changes: 14 additions & 3 deletions ci/github/unit-testing/datcore-adapter.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,21 @@ install() {
}

test() {
pytest --numprocesses=auto --cov=simcore_service_datcore_adapter --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" services/datcore-adapter/tests/unit
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_datcore_adapter \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--numprocesses=auto \
--verbose \
-m "not heavy_load" \
services/datcore-adapter/tests/unit
}

# Check if the function exists (bash specific)
Expand Down
38 changes: 30 additions & 8 deletions ci/github/unit-testing/director-v2.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,39 @@ install() {
}

test() {
pytest --numprocesses=auto --cov=simcore_service_director_v2 --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
-v -m "not travis" services/director-v2/tests/unit --ignore=services/director-v2/tests/unit/with_dbs \
# tests without DB can be safely run in parallel
pytest \
--asyncio-mode=auto \
# these tests cannot be run in parallel
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_director_v2 \
--durations=10 \
--ignore=services/director-v2/tests/unit/with_dbs \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_director_v2 --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--numprocesses=auto \
--verbose \
-m "not heavy_load" \
services/director-v2/tests/unit

# these tests cannot be run in parallel
pytest \
--asyncio-mode=auto \
-v -m "not travis" services/director-v2/tests/unit/with_dbs
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_director_v2 \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
services/director-v2/tests/unit/with_dbs
}

# Check if the function exists (bash specific)
Expand Down
16 changes: 12 additions & 4 deletions ci/github/unit-testing/director.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
pytest \
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_director \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_director --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
-v -m "not travis" services/director/tests
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
services/director/tests
}

# Check if the function exists (bash specific)
Expand Down
18 changes: 13 additions & 5 deletions ci/github/unit-testing/dynamic-sidecar.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ codestyle() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=simcore_service_dynamic_sidecar --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" services/dynamic-sidecar/tests/unit
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=simcore_service_dynamic_sidecar \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
services/dynamic-sidecar/tests/unit
}

# Check if the function exists (bash specific)
Expand Down
18 changes: 13 additions & 5 deletions ci/github/unit-testing/models-library.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=models_library --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
pytest \
--asyncio-mode=auto \
-v -m "not travis" packages/models-library/tests
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=models_library \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
packages/models-library/tests
}

# Check if the function exists (bash specific)
Expand Down
9 changes: 6 additions & 3 deletions ci/github/unit-testing/postgres-database.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ test() {
pytest \
--asyncio-mode=auto \
--color=yes \
--durations=10 \
--cov=simcore_postgres_database \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov-config=.coveragerc \
--cov=simcore_postgres_database \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--durations=10 \
--verbose \
-m "not heavy_load" \
packages/postgres-database/tests
}

Expand Down
16 changes: 12 additions & 4 deletions ci/github/unit-testing/service-integration.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ install() {
}

test() {
pytest --log-format="%(asctime)s %(levelname)s %(message)s" \
pytest \
--color=yes \
--cov-append \
--cov-config=.coveragerc \
--cov-report=term-missing \
--cov-report=xml \
--cov=service_integration \
--durations=10 \
--log-date-format="%Y-%m-%d %H:%M:%S" \
--cov=service_integration --durations=10 --cov-append \
--color=yes --cov-report=term-missing --cov-report=xml --cov-config=.coveragerc \
-v -m "not travis" packages/service-integration/tests
--log-format="%(asctime)s %(levelname)s %(message)s" \
--verbose \
-m "not heavy_load" \
packages/service-integration/tests
}

# Check if the function exists (bash specific)
Expand Down
Loading

0 comments on commit 6600ae0

Please sign in to comment.