-
Notifications
You must be signed in to change notification settings - Fork 40
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
version all the files, update CI tests and vscode settings #77
Conversation
an idea: storing files as e.g. |
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.
The ones I commented on are the only ones I looked at, assuming that the rest are renames and copy-pastes. If there's others that you'd like me to check please lmk!
I'm approving this since the suggested changes aren't mandatory but will make life easier in the future 🔮
PROJECT_SCHEMA_FILES = [ | ||
"./schemas/dbt_project.json", | ||
"./schemas/dbt_project-1.5.json", | ||
"./schemas/dbt_project-1.6.json" | ||
] | ||
|
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.
This might be better as a query that lists all files matching the pattern dbt_project[\-\d\.]*\.json
or something, instead of a hardcoded list that we have to remember to keep up to date
schemas/dependencies-1.6.json
Outdated
@@ -0,0 +1,22 @@ | |||
{ |
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.
lgtm
@@ -0,0 +1,2 @@ | |||
projects: | |||
- gnome: my_dbt_project |
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.
@@ -0,0 +1,2 @@ | |||
projects: | |||
- name: my_dbt_project |
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.
👍
@joellabes would love a quick re-review! I updated the folder paths per Ben's recommendation and added the matrix feature to make CI a lot DRYer. The only notable byproduct of that move was that I also chose not to do the file regexing in |
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.
Magnificent!
.github/workflows/ci.yml
Outdated
- name: Validate dbt_project.yml sample files for dbt version ${{ matrix.dbt-version }} | ||
run: | | ||
npx ajv-cli test -s schemas/dbt_project-1.5.json -d tests/1.5/valid/dbt_project.yml --valid | ||
npx ajv-cli test -s schemas/dbt_project-1.5.json -d tests/1.5/invalid/dbt_project.yml --invalid | ||
- name: Validate resource yml sample files for dbt version 1.5 | ||
run: | | ||
npx ajv-cli test -s schemas/dbt_yml_files-1.5.json -d tests/1.5/valid/schema.yml --valid | ||
npx ajv-cli test -s schemas/dbt_yml_files-1.5.json -d tests/1.5/invalid/schema.yml --invalid | ||
- name: Validate packages.yml sample files for dbt version 1.5 | ||
run: | | ||
npx ajv-cli test -s schemas/packages-1.5.json -d tests/1.5/valid/packages.yml --valid | ||
npx ajv-cli test -s schemas/packages-1.5.json -d tests/1.5/invalid/packages.yml --invalid | ||
- name: Validate selectors.yml sample files for dbt version 1.5 | ||
run: | | ||
npx ajv-cli test -s schemas/selectors-1.5.json -d tests/1.5/valid/selectors.yml --valid | ||
npx ajv-cli test -s schemas/selectors-1.5.json -d tests/1.5/invalid/selectors.yml --invalid | ||
|
||
- name: Validate dbt_project.yml sample files for dbt version 1.6 | ||
run: | | ||
npx ajv-cli test -s schemas/dbt_project-1.6.json -d tests/1.6/valid/dbt_project.yml --valid | ||
npx ajv-cli test -s schemas/dbt_project-1.6.json -d tests/1.6/invalid/dbt_project.yml --invalid | ||
- name: Validate resource yml sample files for dbt version 1.6 | ||
run: | | ||
npx ajv-cli test -s schemas/dbt_yml_files-1.6.json -d tests/1.6/valid/schema.yml --valid | ||
npx ajv-cli test -s schemas/dbt_yml_files-1.6.json -d tests/1.6/invalid/schema.yml --invalid | ||
- name: Validate packages.yml sample files for dbt version 1.6 | ||
run: | | ||
npx ajv-cli test -s schemas/packages-1.6.json -d tests/1.6/valid/packages.yml --valid | ||
npx ajv-cli test -s schemas/packages-1.6.json -d tests/1.6/invalid/packages.yml --invalid | ||
- name: Validate selectors.yml sample files for dbt version 1.6 | ||
run: | | ||
npx ajv-cli test -s schemas/selectors-1.6.json -d tests/1.6/valid/selectors.yml --valid | ||
npx ajv-cli test -s schemas/selectors-1.6.json -d tests/1.6/invalid/selectors.yml --invalid | ||
|
||
- name: Validate dependencies.yml sample files for dbt version 1.6 | ||
run: | | ||
npx ajv-cli test -s schemas/dependencies-1.6.json -d tests/1.6/valid/dependencies.yml --valid | ||
npx ajv-cli test -s schemas/dependencies-1.6.json -d tests/1.6/invalid/dependencies.yml --invalid | ||
npx ajv-cli test -s schemas/${{ matrix.dbt-version }}/${{ matrix.dbt-file-name }}-${{ matrix.dbt-version }}.json -d tests/${{ matrix.dbt-version }}/valid/${{ matrix.dbt-file-name }}.yml --valid | ||
npx ajv-cli test -s schemas/${{ matrix.dbt-version }}/${{ matrix.dbt-file-name }}-${{ matrix.dbt-version }}.json -d tests/${{ matrix.dbt-version }}/invalid/${{ matrix.dbt-file-name }}.yml --invalid | ||
|
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.
:chefs-kiss:
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.
:shreks-kick:
@joellabes i didn't mean to dismiss your stale review :( i moved the default files back to the root of the folder so the IDE validation doesn't break |
this PR
dependencies.yml
support in 1.6