Copy over latest schema from fusion #251
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| - pull_request | |
| - workflow_dispatch | |
| jobs: | |
| validate-json-schemas: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # 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", "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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # 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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 | |
| - uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # 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 |