Skip to content

chore(deps): update dependency pre-commit to >=4,<4.2 #257

chore(deps): update dependency pre-commit to >=4,<4.2

chore(deps): update dependency pre-commit to >=4,<4.2 #257

Workflow file for this run

name: Test
on:
pull_request:
paths-ignore:
- "**/*.md"
jobs:
test-lint:
name: runner / sqlfluff (github-check)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sqlfluff:
- "3.2.5"
extra_requirements_txt:
- "testdata/test_failed_dbt/extra_requirements-1.6.txt"
- "testdata/test_failed_dbt/extra_requirements-1.7.txt"
- "testdata/test_failed_dbt/extra_requirements-1.8.txt"
config:
- ".sqlfluff.bigquery"
- ".sqlfluff.postgres"
- ".sqlfluff.redshift"
- ".sqlfluff.snowflake"
- ".sqlfluff.spark"
steps:
- uses: actions/checkout@v4
- uses: ./
id: lint-sql
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
sqlfluff_version: ${{ matrix.sqlfluff }}
sqlfluff_command: lint
templater: jinja
working-directory: "${{ github.workspace }}/testdata/test_failed_dbt"
config: "${{ github.workspace }}/testdata/test_failed_dbt/${{ matrix.config }}"
paths: "${{ github.workspace }}/testdata/test_failed_dbt/models"
extra_requirements_txt: "${{ github.workspace }}/${{ matrix.extra_requirements_txt }}"
- name: check the exit code
if: ${{ !success() }}
run: echo 'The previous step should fail' && exit 1
- name: "Test outputs"
if: always()
shell: bash
run: |
echo '${{ steps.lint-sql.outputs.sqlfluff-results }}' | jq -r '.'
echo '${{ steps.lint-sql.outputs.sqlfluff-results-rdjson }}' | jq -r '.'
echo '${{ steps.lint-sql.outputs.sqlfluff-exit-code }}'
echo '${{ steps.lint-sql.outputs.reviewdog-exit-code }}'
test-fix:
needs: ["test-lint"]
name: runner / sqlfluff (test-fix)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sqlfluff:
- "3.2.5"
extra_requirements_txt:
- "testdata/test_failed_dbt/extra_requirements-1.6.txt"
- "testdata/test_failed_dbt/extra_requirements-1.7.txt"
- "testdata/test_failed_dbt/extra_requirements-1.8.txt"
config:
- ".sqlfluff.bigquery"
- ".sqlfluff.postgres"
- ".sqlfluff.redshift"
- ".sqlfluff.snowflake"
- ".sqlfluff.spark"
steps:
- uses: actions/checkout@v4
- uses: ./
id: lint-sql
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
sqlfluff_version: ${{ matrix.sqlfluff }}
sqlfluff_command: fix
templater: jinja
working-directory: "${{ github.workspace }}/testdata/test_failed_dbt"
config: "${{ github.workspace }}/testdata/test_failed_dbt/${{ matrix.config }}"
paths: "${{ github.workspace }}/testdata/test_failed_dbt/models"
extra_requirements_txt: "${{ github.workspace }}/${{ matrix.extra_requirements_txt }}"