Skip to content

fix pagination in ls limiting copy to first 50 tables #96

fix pagination in ls limiting copy to first 50 tables

fix pagination in ls limiting copy to first 50 tables #96

Workflow file for this run

name: SQLFluff
on:
- push
jobs:
lint-mimic-iv:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install sqlfluff
run: "pip install sqlfluff==3.5.0"
- name: Get changed files
id: get_file_changes
uses: trilom/[email protected]
with:
output: ' '
- name: Get changed .sql files in mimic-iv concepts folder
id: get_files_to_lint
shell: bash
run: |
# Compose list of changed SQL files under mimic-iv/concepts and export to step output
files="$(echo "${{ steps.get_file_changes.outputs.files_modified }} ${{ steps.get_file_changes.outputs.files_added }}" \
| tr -s ' ' '\n' \
| grep -E '^mimic-iv/concepts/.*[.]sql$' \
| tr -s '\n' ' ')"
echo "lintees=${files}" >> "$GITHUB_OUTPUT"
- name: Lint SQL files
id: sqlfluff_json
if: steps.get_files_to_lint.outputs.lintees != ''
shell: bash
run: sqlfluff lint --format github-annotation --annotation-level failure --nofail ${{ steps.get_files_to_lint.outputs.lintees }} > annotations.json
- name: Annotate
uses: yuzutech/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title: "SQLFluff Lint"
input: "./annotations.json"