Skip to content

Add enabled to schema for unit tests #203

Add enabled to schema for unit tests

Add enabled to schema for unit tests #203

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 [email protected]
- 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", "1.7", "latest"]
dbt-file-name: ["dbt_project", "packages", "selectors", "dbt_yml_files", "dependencies", "dbt_cloud"]
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 [email protected]
- 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