-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update testing structure for dbt Labs testing support - postgres #33
Merged
NiallRees
merged 2 commits into
get-select:main
from
emmyoop:er/support-dbt-testing-format
Nov 13, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,30 @@ | ||
# **what?** | ||
# Run tests for dbt-snowflake-query-tags against supported adapters | ||
|
||
# **why?** | ||
# To ensure that dbt-snowflake-query-tags works as expected with all supported adapters | ||
|
||
# **when?** | ||
# On every PR, and every push to main and when manually triggered | ||
|
||
name: Package Integration Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
uses: dbt-labs/dbt-package-testing/.github/workflows/run_tox.yml@v1 | ||
with: | ||
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_TEST_USER }} | ||
SNOWFLAKE_ROLE: ${{ secrets.SNOWFLAKE_TEST_ROLE }} | ||
SNOWFLAKE_DATABASE: ${{ secrets.SNOWFLAKE_TEST_DATABASE }} | ||
SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_TEST_WAREHOUSE }} | ||
SNOWFLAKE_SCHEMA: "integration_tests_snowflake_${{ github.run_number }}" | ||
secrets: | ||
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }} | ||
DBT_ENV_SECRET_SNOWFLAKE_PASS: ${{ secrets.SNOWFLAKE_TEST_PASSWORD }} |
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
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
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,31 @@ | ||
# HEY! This file is used in the dbt-snowflake-query-tags integrations tests with GitHub Actions. | ||
# You should __NEVER__ check credentials into version control. Thanks for reading :) | ||
|
||
config: | ||
send_anonymous_usage_stats: False | ||
use_colors: True | ||
|
||
integration_tests: | ||
target: snowflake | ||
outputs: | ||
snowflake: | ||
# type: snowflake | ||
# account: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_ACCOUNT') }}" | ||
# user: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_USER') }}" | ||
# password: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_PASSWORD') }}" | ||
# role: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_ROLE') }}" | ||
# database: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_DATABASE') }}" | ||
# warehouse: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_TEST_WAREHOUSE') }}" | ||
# schema: dbt_snowflake_query_tags_test_commit_{{ env_var('GITHUB_SHA_OVERRIDE', '') if env_var('GITHUB_SHA_OVERRIDE', '') else env_var('GITHUB_SHA') }} | ||
# threads: 8 | ||
|
||
snowflake: | ||
type: "snowflake" | ||
account: "{{ env_var('SNOWFLAKE_ACCOUNT') }}" | ||
user: "{{ env_var('SNOWFLAKE_USER') }}" | ||
password: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_PASS') }}" | ||
role: "{{ env_var('SNOWFLAKE_ROLE') }}" | ||
database: "{{ env_var('SNOWFLAKE_DATABASE') }}" | ||
warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE') }}" | ||
schema: "{{ env_var('SNOWFLAKE_SCHEMA') }}" | ||
threads: 10 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
SUPPORTED_ADAPTERS=snowflake |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NiallRees the CI is failing because I updated the testing folder to be located somewhere else. But the workflow itself is triggered off
pull_request_target
. That means the workflow code is running what exists onmain
- the version looking for profiles inintegration_test_project
even though the profiles file is now located inintgeration_tests
.We can do this iteratively where the testing folder is duplicated then another PR follows to remove the duplicated code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll merge this if you’re confident, then want to open another dummy change PR to validate? I think we might actually need to fix some tests ourselves too