chore: add CI workflows and pre-commit config - #5
Merged
Conversation
Add GitHub Actions build and release workflows, plus a pre-commit configuration matching the dbt-adapters style (black, flake8, mypy). Fix compatibility issues surfaced by enabling lint and tests: - Inline type: ignore on SparkCredentials-inherited attributes - Hardcode SCHEMA_NOT_FOUND_MESSAGES in the test module (removed from dbt-spark PyPI release) - Remove test_unknown_error_is_raised (behavior no longer guaranteed by upstream dbt-spark) - Apply black formatting to tests/functional/adapter/test_basic.py
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
build.yml(lint, unit tests, build on push/PR) andrelease.yml(tag-driven PyPI publish + GitHub Release)..pre-commit-config.yamlmodeled on the dbt-adapters style: black, flake8, mypy, plus the standard pre-commit hooks. Wires into the existinghatch run code-qualityscript.# type: ignoreonSparkCredentials-inherited attributes inconnections.py(matches the pattern used across dbt-adapters).SCHEMA_NOT_FOUND_MESSAGESintests/unit/test_adapter.pysince it was removed from thedbt-sparkPyPI release.test_unknown_error_is_raised— the behavior it asserted is no longer guaranteed by upstreamdbt-spark, which now swallows allDbtRuntimeErrors into[].tests/functional/adapter/test_basic.py.Test plan
hatch run code-qualitypasses locallyhatch run unit-testspasses locally (20/20)release/release/testGitHub environments created under repo settings