0

I am trying to setup a simple github actions workflow for sql linting using sqlfluff package. here is sunrise movement workflow which is simple and clean.

name: Lint Models

on: [pull_request]

jobs:
  lint-models:
    runs-on: ubuntu-latest
    steps:
      - uses: "actions/checkout@v2"
      - uses: "actions/setup-python@v2"
        with:
            python-version: "3.8"
      - name: Install SQLFluff
        run: "pip install sqlfluff==0.12.0"
      - name: Lint models
        run: "sqlfluff lint models"

When I tried to run it in github actions, it is giving me the following error message. Not quite sure why it is throwing error. Help is appreciated as I am trying to learn github acitons for the first time. Error

Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
G1124E
  • 407
  • 1
  • 10
  • 20
  • There is no file or folder called `models`. Neither is it created in your workflow nor is it part of your repository (would be created on the runner in the checkout step). – riQQ Apr 10 '22 at 22:06

1 Answers1

0

You have this:

        run: "sqlfluff lint models"

This says to lint the directory called models. The directory does not exist in your repo (is it a sub folder?).

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92