From bf9988351b8cdb2b24141786646f9c187695fa71 Mon Sep 17 00:00:00 2001 From: laysabit Date: Thu, 14 Mar 2024 19:22:01 -0300 Subject: [PATCH] test #9 --- .github/workflows/diff-quality.yml | 37 +----------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/.github/workflows/diff-quality.yml b/.github/workflows/diff-quality.yml index 203fedd..04db3c4 100644 --- a/.github/workflows/diff-quality.yml +++ b/.github/workflows/diff-quality.yml @@ -37,43 +37,8 @@ jobs: with: project_id: crypto-stellar credentials_json: "${{ secrets.CREDS_PROD_HUBBLE }}" - - - name: Get changed files - id: get_file_changes - uses: trilom/file-changes-action@v1.2.4 - with: - output: " " - - - name: Get new and changed .sql files in /models to lint - id: get_files_to_lint - shell: bash -l {0} - run: | - # Set the command in the $() brackets as an output to use in later steps - echo "::set-output name=lintees::$( - # Issue where grep regular expressions don't work as expected on the - # Github Actions shell, check dbt/models/ folder - echo \ - $(echo ${{ steps.get_file_changes.outputs.files_modified }} | - tr -s ' ' '\n' | - grep -E '^models.*[.]sql$' | - tr -s '\n' ' ') \ - $(echo ${{ steps.get_file_changes.outputs.files_added }} | - tr -s ' ' '\n' | - grep -E '^models.*[.]sql$' | - tr -s '\n' ' ') - )" - - - name: Lint dbt models - id: sqlfluff_json - if: steps.get_files_to_lint.outputs.lintees != '' - shell: bash -l {0} - run: | - python -m pip install --upgrade pip - dbt deps - sqlfluff lint --format github-annotation --annotation-level failure --nofail ${{ steps.get_files_to_lint.outputs.lintees }} > annotations.json - sed -i '/^\[/!d' annotations.json # see https://github.com/sqlfluff/sqlfluff/issues/2244 - name: Checkout source branch and diff quality run: | git checkout ${{ github.ref_name }} - diff-quality --violations=sqlfluff --compare-branch=origin/master \ No newline at end of file + diff-quality --violations=sqlfluff --compare-branch=origin/master --fail-under=95 \ No newline at end of file