Skip to content

Commit

Permalink
Unit test prep (#117)
Browse files Browse the repository at this point in the history
* Create new versions for next v of dbt

* Sort dbt_project schema

* Add unit test configs to dbt_project

* enclose in properties block and enable recursion

* Add unit testing + format file

* Sorting file

* First pass at `given` object

* Flesh out input and expect blocks

* Add overrides block

* rename files to latest instead of next

* Add valid unit tests for automated testing

* fix validate plussless props to handle non-existence of unit tests

* default to empty dict

* Add invalid unit test and a valid example using csv
  • Loading branch information
joellabes authored Feb 8, 2024
1 parent b5a5d67 commit bff48a0
Show file tree
Hide file tree
Showing 21 changed files with 3,544 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
test-against-sample-dbt-files:
strategy:
matrix:
dbt-version: ["1.5", "1.6", "1.7"]
dbt-version: ["1.5", "1.6", "1.7", "latest"]
dbt-file-name: ["dbt_project", "packages", "selectors", "dbt_yml_files", "dependencies", "dbt_cloud"]
exclude:
- dbt-version: "1.5"
Expand Down
30 changes: 30 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,43 @@
],
"./schemas/1.7/dependencies-1.7.json": [
"/tests/1.7/**/dependencies.yml"
],

"./schemas/latest/dbt_yml_files-latest.json": [
"/tests/latest/**/*.yml",
"!profiles.yml",
"!dbt_project.yml",
"!dbt_cloud.yml",
"!packages.yml",
"!selectors.yml",
"!dependencies.yml",
"!package-lock.yml",
"!profile_template.yml",
"!/.github/**/*.yml"
],

"./schemas/latest/dbt_project-latest.json": [
"/tests/latest/**/dbt_project.yml"
],
"./schemas/latest/dbt_cloud-latest.json": [
"/tests/latest/**/dbt_cloud.yml"
],
"./schemas/latest/selectors-latest.json": [
"/tests/latest/**/selectors.yml"
],
"./schemas/latest/packages-latest.json": [
"/tests/latest/**/packages.yml"
],
"./schemas/latest/dependencies-latest.json": [
"/tests/latest/**/dependencies.yml"
]

},
"sortJSON.orderOverride": [
"version",
"title",
"name",
"description",
"type",
"required",
"if",
Expand Down
14 changes: 14 additions & 0 deletions schemas/latest/dbt_cloud-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"project-id": {
"type": "string"
},
"defer-env-id": {
"type": "string"
}
},
"required": ["project-id"],
"additionalProperties": false
}
Loading

0 comments on commit bff48a0

Please sign in to comment.