Skip to content

add the schema for SMs and metrics, remove from project yml schema #104

add the schema for SMs and metrics, remove from project yml schema

add the schema for SMs and metrics, remove from project yml schema #104

Workflow file for this run

name: CI
on:
- pull_request
- workflow_dispatch
jobs:
validate-json-schemas:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: install avj
run: npm install --no-save ajv-cli@5.0.0
- name: validate all schema files
run: find ./schemas -name "*.json" | xargs -n 1 -I {} npx ajv-cli compile -s {} --strict=false
test-against-sample-dbt-files:
strategy:
matrix:
dbt-version: ["1.5", "1.6"]
dbt-file-name: ["dbt_project", "packages", "selectors", "dbt_yml_files", "dependencies"]
exclude:
- dbt-version: "1.5"
dbt-file-name: "dependencies"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: install avj
run: npm install --no-save ajv-cli@5.0.0
- name: Validate dbt_project.yml sample files for dbt version ${{ matrix.dbt-version }}
run: |
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
validate_plusless_properties:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: install avj
run: |
python -m pip install --upgrade pip
pip install jsondiff
- name: Validate dbt_project.json has equivalent properties with and without pluses
run: |
python tests/validate_plusless_properties.py