Compare commits

...

2 Commits

Author SHA1 Message Date
Michelle Ark
ca385c7058 update job label 2023-08-03 16:45:10 -04:00
Michelle Ark
95d217d106 first pass: split integration and adapter tests 2023-08-03 16:39:54 -04:00
2 changed files with 21 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ jobs:
echo "include=${INCLUDE_GROUPS}" >> $GITHUB_OUTPUT echo "include=${INCLUDE_GROUPS}" >> $GITHUB_OUTPUT
integration: integration:
name: (${{ matrix.split-group }}) integration test / python ${{ matrix.python-version }} / ${{ matrix.os }} name: (${{ matrix.split-group }}) ${{ matrix.tox-env }} test / python ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 30 timeout-minutes: 30
@@ -158,10 +158,10 @@ jobs:
matrix: matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"] python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-20.04] os: [ubuntu-20.04]
tox-env: [integration, adapter]
split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }} split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }}
include: ${{ fromJson(needs.integration-metadata.outputs.include) }} include: ${{ fromJson(needs.integration-metadata.outputs.include) }}
env: env:
TOXENV: integration
DBT_INVOCATION_ENV: github-actions DBT_INVOCATION_ENV: github-actions
DBT_TEST_USER_1: dbt_test_user_1 DBT_TEST_USER_1: dbt_test_user_1
DBT_TEST_USER_2: dbt_test_user_2 DBT_TEST_USER_2: dbt_test_user_2
@@ -203,6 +203,7 @@ jobs:
- name: Run tests - name: Run tests
run: tox -- --ddtrace run: tox -- --ddtrace
env: env:
TOXENV: ${{ matrix.tox-env }}
PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }} PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }}
- name: Get current date - name: Get current date

19
tox.ini
View File

@@ -1,6 +1,6 @@
[tox] [tox]
skipsdist = True skipsdist = True
envlist = unit,integration envlist = unit,integration,adapter
[testenv:{unit,py38,py39,py310,py311,py}] [testenv:{unit,py38,py39,py310,py311,py}]
description = unit testing description = unit testing
@@ -33,3 +33,20 @@ commands =
deps = deps =
-rdev-requirements.txt -rdev-requirements.txt
-reditable-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