-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
break out integration tests into a composite action
- Loading branch information
1 parent
71a093b
commit 3469652
Showing
2 changed files
with
64 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Run Integration Tests | ||
description: Runs integration tests for a specific version of Python | ||
inputs: | ||
python-version: | ||
description: The version of Python to test against | ||
required: true | ||
dbt-core-branch: | ||
description: The branch of dbt-core to test against | ||
required: false | ||
default: '' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --user --upgrade pip | ||
python -m pip install .[test] | ||
- name: Update pyproject.toml | ||
if: inputs.dbt-core-branch != '' | ||
shell: bash | ||
run: | | ||
python -m pip install bumpversion | ||
./.github/scripts/update_dbt_core_branch.sh ${{ inputs.dbt-core-branch }} | ||
python -m pip install --force-reinstall . | ||
- name: Run integration tests | ||
env: | ||
SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }} | ||
SNOWFLAKE_TEST_PASSWORD: ${{ secrets.SNOWFLAKE_TEST_PASSWORD }} | ||
SNOWFLAKE_TEST_USER: ${{ secrets.SNOWFLAKE_TEST_USER }} | ||
SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.SNOWFLAKE_TEST_WAREHOUSE }} | ||
SNOWFLAKE_TEST_OAUTH_REFRESH_TOKEN: ${{ secrets.SNOWFLAKE_TEST_OAUTH_REFRESH_TOKEN }} | ||
SNOWFLAKE_TEST_OAUTH_CLIENT_ID: ${{ secrets.SNOWFLAKE_TEST_OAUTH_CLIENT_ID }} | ||
SNOWFLAKE_TEST_OAUTH_CLIENT_SECRET: ${{ secrets.SNOWFLAKE_TEST_OAUTH_CLIENT_SECRET }} | ||
SNOWFLAKE_TEST_ALT_DATABASE: ${{ secrets.SNOWFLAKE_TEST_ALT_DATABASE }} | ||
SNOWFLAKE_TEST_ALT_WAREHOUSE: ${{ secrets.SNOWFLAKE_TEST_ALT_WAREHOUSE }} | ||
SNOWFLAKE_TEST_DATABASE: ${{ secrets.SNOWFLAKE_TEST_DATABASE }} | ||
SNOWFLAKE_TEST_QUOTED_DATABASE: ${{ secrets.SNOWFLAKE_TEST_QUOTED_DATABASE }} | ||
SNOWFLAKE_TEST_ROLE: ${{ secrets.SNOWFLAKE_TEST_ROLE }} | ||
DBT_TEST_USER_1: dbt_test_role_1 | ||
DBT_TEST_USER_2: dbt_test_role_2 | ||
DBT_TEST_USER_3: dbt_test_role_3 | ||
shell: bash | ||
run: python -m pytest tests/functional --ddtrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters