Skip to content

Commit bed3c70

Browse files
committed
do not include flaky tests in matrix runs
1 parent 424f7da commit bed3c70

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

.github/workflows/integration-tests-azure.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,36 @@ jobs:
7070
DBT_TEST_AAD_PRINCIPAL_1: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_1 }}
7171
DBT_TEST_AAD_PRINCIPAL_2: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_2 }}
7272
SQLSERVER_TEST_DRIVER: 'ODBC Driver ${{ matrix.msodbc_version }} for SQL Server'
73-
run: pytest -ra -v tests/functional --profile "${{ matrix.profile }}"
73+
run: pytest --ignore=tests/functional/adapter/test_provision_users.py -ra -v tests/functional --profile "${{ matrix.profile }}"
74+
75+
flaky-tests-azure:
76+
name: Integration tests on Azure
77+
runs-on: ubuntu-latest
78+
container:
79+
image: ghcr.io/${{ github.repository }}:CI-3.11-msodbc18
80+
steps:
81+
- uses: actions/checkout@v3
82+
83+
- name: Install dependencies
84+
run: pip install -r dev_requirements.txt
85+
86+
- name: Wake up server
87+
env:
88+
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
89+
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
90+
DBT_AZURESQL_UID: ${{ secrets.DBT_AZURESQL_UID }}
91+
DBT_AZURESQL_PWD: ${{ secrets.DBT_AZURESQL_PWD }}
92+
MSODBC_VERSION: ${{ matrix.msodbc_version }}
93+
run: python devops/scripts/wakeup_azure.py
94+
95+
- name: Run auto provisioning tests
96+
env:
97+
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
98+
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
99+
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
100+
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
101+
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}
102+
DBT_TEST_AAD_PRINCIPAL_1: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_1 }}
103+
DBT_TEST_AAD_PRINCIPAL_2: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_2 }}
104+
SQLSERVER_TEST_DRIVER: 'ODBC Driver 18 for SQL Server'
105+
run: pytest -ra -v tests/functional/adapter/test_provision_users.py --profile "ci_azure_environment"

tests/functional/adapter/test_provision_users.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ def test_auto_provision(self, project):
6060
run_dbt(["run"])
6161

6262

63-
@pytest.mark.only_with_profile(
64-
"ci_azure_cli", "ci_azure_auto", "ci_azure_environment", "user_azure"
65-
)
63+
@pytest.mark.only_with_profile("ci_azure_environment", "user_azure")
6664
@pytest.mark.flaky(max_runs=5, min_passes=1)
6765
class TestProvisionSingleUserAzureSQL(BaseTestProvisionAzureSQL):
6866
@pytest.fixture(scope="class")
@@ -73,9 +71,7 @@ def models(self):
7371
}
7472

7573

76-
@pytest.mark.only_with_profile(
77-
"ci_azure_cli", "ci_azure_auto", "ci_azure_environment", "user_azure"
78-
)
74+
@pytest.mark.only_with_profile("ci_azure_environment", "user_azure")
7975
@pytest.mark.flaky(max_runs=5, min_passes=1)
8076
class TestProvisionMultipleUsersAzureSQL(BaseTestProvisionAzureSQL):
8177
@pytest.fixture(scope="class")

0 commit comments

Comments
 (0)