-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from dbt-labs/add-to-CI-tests
Add to ci tests
- Loading branch information
Showing
9 changed files
with
117 additions
and
4 deletions.
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 |
---|---|---|
|
@@ -26,7 +26,20 @@ jobs: | |
node-version: 16 | ||
- name: install avj | ||
run: npm install --no-save [email protected] | ||
- name: validate dbt_project.yml sample file | ||
run: npx ajv-cli validate -s schemas/dbt_project.json -d tests/dbt_project.yml | ||
- name: validate sample model YAML file | ||
run: npx ajv-cli validate -s schemas/dbt_yml_files.json -d tests/schema.yml | ||
- name: Validate dbt_project.yml sample files | ||
run: | | ||
npx ajv-cli test -s schemas/dbt_project.json -d tests/valid/dbt_project.yml --valid | ||
npx ajv-cli test -s schemas/dbt_project.json -d tests/invalid/dbt_project.yml --invalid | ||
- name: Validate resource yml sample files | ||
run: | | ||
npx ajv-cli test -s schemas/dbt_yml_files.json -d tests/valid/schema.yml --valid | ||
npx ajv-cli test -s schemas/dbt_yml_files.json -d tests/invalid/schema.yml --invalid | ||
- name: Validate packages.yml sample files | ||
run: | | ||
npx ajv-cli test -s schemas/packages.json -d tests/valid/packages.yml --valid | ||
npx ajv-cli test -s schemas/packages.json -d tests/invalid/packages.yml --invalid | ||
- name: Validate selectors.yml sample files | ||
run: | | ||
npx ajv-cli test -s schemas/selectors.json -d tests/valid/selectors.yml --valid | ||
npx ajv-cli test -s schemas/selectors.json -d tests/invalid/selectors.yml --invalid | ||
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,44 @@ | ||
# this file was generated with dbt init with dbt 1.2.1 | ||
|
||
# Name your project! Project names should contain only lowercase characters | ||
# and underscores. A good package name should reflect your organization's | ||
# name or the intended use of these models | ||
name: 'test' | ||
version: '1.0.0' | ||
config-version: 2 | ||
|
||
# This setting configures which "profile" dbt uses for this project. | ||
profile: 'test' | ||
|
||
# These configurations specify where dbt should look for different types of files. | ||
# The `model-paths` config, for example, states that models in this project can be | ||
# found in the "models/" directory. You probably won't need to change these! | ||
model-paths: ["models"] | ||
analysis-paths: ["analyses"] | ||
test-paths: ["tests"] | ||
seed-paths: ["seeds"] | ||
macro-paths: ["macros"] | ||
snapshot-paths: ["snapshots"] | ||
|
||
target-path: "target" # directory which will store compiled SQL files | ||
clean-targets: # directories to be removed by `dbt clean` | ||
- "target" | ||
- "dbt_packages" | ||
|
||
|
||
# Configuring models | ||
# Full documentation: https://docs.getdbt.com/docs/configuring-models | ||
|
||
# In this example config, we tell dbt to build all models in the example/ directory | ||
# as tables. These settings can be overridden in the individual model files | ||
# using the `{{ config(...) }}` macro. | ||
models: | ||
test: | ||
# Config indicated by + and applies to all files under models/example/ | ||
example: | ||
+materialized: view | ||
+bogus_key: true | ||
|
||
seeds: | ||
test: | ||
+enabled: false |
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,8 @@ | ||
packages: | ||
- package: dbt-labs/dbt-utils | ||
version_number: 1.0.0 | ||
|
||
- git_address: "https://github.com/dbt-labs/dbt-utils.git" | ||
revision: 0.9.2 | ||
|
||
- local_path: /opt/dbt/redshift |
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,24 @@ | ||
# this file was generated with dbt init with dbt 1.2.1 | ||
|
||
version: 2 | ||
|
||
models: | ||
- name: my_first_dbt_model | ||
description: "A starter dbt model" | ||
jarrod: saltalamachhia | ||
columns: | ||
- name: id | ||
description: "The primary key for this table" | ||
nomar: garciaparra | ||
tests: | ||
- unique | ||
- not_null | ||
|
||
- name: my_second_dbt_model | ||
description: "A starter dbt model" | ||
columns: | ||
- name: id | ||
description: "The primary key for this table" | ||
tests: | ||
- unique | ||
- not_null |
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,8 @@ | ||
selector: | ||
- name: nodes_to_joy | ||
definition: | ||
method_of_attack: tag | ||
value: nightly | ||
dont_include: | ||
- "@tag:daily" | ||
|
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,8 @@ | ||
packages: | ||
- package: dbt-labs/dbt-utils | ||
version: 1.0.0 | ||
|
||
- git: "https://github.com/dbt-labs/dbt-utils.git" | ||
revision: 1.0.0 | ||
|
||
- local: /opt/dbt/redshift |
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,8 @@ | ||
selectors: | ||
- name: nodes_to_joy | ||
definition: | ||
method: tag | ||
value: nightly | ||
exclude: | ||
- "@tag:daily" | ||
|