Skip to content

Commit

Permalink
get unit tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Nov 16, 2024
1 parent 43fe341 commit e1a3b10
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ permissions:
jobs:
integration-tests:
runs-on: ${{ inputs.os }}
environment: ${{ inputs.package }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
results:
name: "Pull request checks"
if: always()
needs: [code-quality, changelog, unit-tests, integration-tests]
needs: [code-quality, changelog, verify-builds, unit-tests, integration-tests]
runs-on: ${{ vars.DEFAULT_RUNNER }}
steps:
- uses: re-actors/alls-green@release/v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/user-docs-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
issues: write # comments on issues

jobs:
open_issues:
user-docs-issue:
# we only want to run this when the issue is closed as completed and the label `user docs` has been assigned.
# If this logic does not exist in this workflow, it runs the
# risk of duplication of issues being created due to merge and label both triggering this workflow to run and neither having
Expand Down
11 changes: 8 additions & 3 deletions dbt-adapters/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
dependencies = [
"dbt_common @ git+https://github.com/dbt-labs/dbt-common.git",
"pre-commit==3.7.0",
"pytest",
"pytest-dotenv",
"pytest-xdist",
]
[envs.default.scripts]
setup = "pre-commit install"
code-quality = "pre-commit run --all-files"
unit-tests = "python -m pytest {args:tests/unit}"
unit-tests = 'echo "dbt-adapters does not have any integration tests"'

[envs.hatch-test]
randomize = true
parallel = true
extra-dependencies = [
"dbt_common @ git+https://github.com/dbt-labs/dbt-common.git",
]

[envs.build]
detached = true
Expand Down
6 changes: 3 additions & 3 deletions dbt-adapters/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ build-backend = "hatchling.build"
path = "src/dbt/adapters/__version__.py"

[tool.hatch.build.targets.sdist]
packages = ["src/dbt/adapters"]
packages = ["src/dbt/adapters", "src/dbt/include"]
sources = ["src"]

[tool.hatch.build.targets.wheel]
packages = ["src/dbt/adapters"]
packages = ["src/dbt/adapters", "src/dbt/include"]
sources = ["src"]

[tool.mypy]
Expand All @@ -60,6 +60,6 @@ module = ["dbt.adapters.events.adapter_types_pb2"]
follow_imports = "skip"

[tool.pytest]
testpaths = ["tests/functional", "tests/unit"]
testpaths = ["tests/unit"]
color = true
csv = "results.csv"
Empty file.

0 comments on commit e1a3b10

Please sign in to comment.