diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e8123ec951..d6da80d4ded 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ defaults: # top-level adjustments can be made here env: # number of parallel processes to spawn for python integration testing - PYTHON_INTEGRATION_TEST_WORKERS: 5 + PYTHON_INTEGRATION_TEST_WORKERS: 8 jobs: code-quality: diff --git a/.github/workflows/structured-logging-schema-check.yml b/.github/workflows/structured-logging-schema-check.yml index da613a4c3e4..05e4c44dbc0 100644 --- a/.github/workflows/structured-logging-schema-check.yml +++ b/.github/workflows/structured-logging-schema-check.yml @@ -23,7 +23,7 @@ permissions: read-all # top-level adjustments can be made here env: # number of parallel processes to spawn for python testing - PYTHON_INTEGRATION_TEST_WORKERS: 5 + PYTHON_INTEGRATION_TEST_WORKERS: 8 jobs: integration-metadata: diff --git a/core/hatch.toml b/core/hatch.toml index 24acfb6ea91..132cdd539c9 100644 --- a/core/hatch.toml +++ b/core/hatch.toml @@ -201,12 +201,18 @@ DBT_TEST_USER_1 = "dbt_test_user_1" DBT_TEST_USER_2 = "dbt_test_user_2" DBT_TEST_USER_3 = "dbt_test_user_3" + +# Note: graph_selection, defer_state, partial_parsing and sources tests are run after the majority of other tests as they are known to be slow (by necessity) and should be split across workers when multiple workers are present. + [envs.ci.scripts] unit-tests = "python -m pytest --cov=dbt --cov-report=xml {args} ../tests/unit" code-quality = "pre-commit run --all-files" integration-tests = """ -python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional -k "not tests/functional/graph_selection" && \ -python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional/graph_selection +python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional -k "not tests/functional/graph_selection and not tests/functional/defer_state and not tests/functional/partial_parsing and not tests/functional/sources" && \ +python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional/graph_selection && \ +python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional/defer_state && \ +python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional/partial_parsing && \ +python -m pytest --cov=dbt --cov-append --cov-report=xml {args} ../tests/functional/sources """ # Note: Python version matrix is handled by GitHub Actions CI, not hatch. diff --git a/tests/functional/deprecations/test_deprecations.py b/tests/functional/deprecations/test_deprecations.py index 6585e4ccc09..1d31d835603 100644 --- a/tests/functional/deprecations/test_deprecations.py +++ b/tests/functional/deprecations/test_deprecations.py @@ -405,7 +405,9 @@ def test_custom_key_in_config_sql_deprecation(self, project): "dbt.jsonschemas.jsonschemas._get_allowed_config_key_aliases", return_value=["my_custom_key"], ) - def test_custom_key_in_config_sql_deprecation_adapter_specific_config_key_aliases(self, *_): + def test_custom_key_in_config_sql_deprecation_adapter_specific_config_key_aliases( + self, mock_get_aliases, project + ): event_catcher = EventCatcher(CustomKeyInConfigDeprecation) run_dbt( ["parse", "--no-partial-parse", "--show-all-deprecations"], diff --git a/tests/functional/init/test_init.py b/tests/functional/init/test_init.py index 1c477f9bf0c..20b27157526 100644 --- a/tests/functional/init/test_init.py +++ b/tests/functional/init/test_init.py @@ -85,7 +85,7 @@ def test_init_task_in_project_with_existing_profiles_yml( """ ) - def test_init_task_in_project_specifying_profile_errors(self): + def test_init_task_in_project_specifying_profile_errors(self, project): with pytest.raises(DbtRuntimeError) as error: run_dbt(["init", "--profile", "test"], expect_pass=False) assert "Can not init existing project with specified profile" in str(error)