From 95d217d10679a8eacb548ac5aad03deb200f981a Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Thu, 3 Aug 2023 16:39:54 -0400 Subject: [PATCH] first pass: split integration and adapter tests --- .github/workflows/main.yml | 3 ++- tox.ini | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a9b942721b..eab07c3ada1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -158,10 +158,10 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] os: [ubuntu-20.04] + tox-env: [integration, adapter] split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }} include: ${{ fromJson(needs.integration-metadata.outputs.include) }} env: - TOXENV: integration DBT_INVOCATION_ENV: github-actions DBT_TEST_USER_1: dbt_test_user_1 DBT_TEST_USER_2: dbt_test_user_2 @@ -203,6 +203,7 @@ jobs: - name: Run tests run: tox -- --ddtrace env: + TOXENV: ${{ matrix.tox-env }} PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }} - name: Get current date diff --git a/tox.ini b/tox.ini index 2da444102fe..b0b51023793 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = True -envlist = unit,integration +envlist = unit,integration,adapter [testenv:{unit,py38,py39,py310,py311,py}] description = unit testing @@ -33,3 +33,20 @@ commands = deps = -rdev-requirements.txt -reditable-requirements.txt + +[testenv:{adapter,py38-adapter,py39-adapter,py310-adapter,py311-adapter,py-adapter}] +description = adapter testing +download = true +skip_install = true +passenv = + DBT_* + POSTGRES_TEST_* + PYTEST_ADDOPTS + DD_SERVICE + DD_ENV +commands = + {envpython} -m pytest --cov=core --cov-append --cov-report=xml {posargs} tests/adapter + +deps = + -rdev-requirements.txt + -reditable-requirements.txt