update refs #6
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
name: SQLFluff | |
on: | |
- pull_request | |
jobs: | |
lint-models: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.10" | |
- name: install sqlfluff | |
run: "pip install -U pip && pip install sqlfluff sqlfluff-templater-dbt" | |
- name: Lint dbt models | |
id: sqlfluff_json | |
shell: bash -l {0} | |
run: git diff --name-only --cached | egrep '\.sql' | { while read -r file; do sqlfluff lint --config ./.sqlfluff --dialect redshift "$file"; done; } |