Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Show output - optional" step shows empty results #96

Open
evaristoeusebio-reed opened this issue Feb 16, 2024 · 0 comments
Open

"Show output - optional" step shows empty results #96

evaristoeusebio-reed opened this issue Feb 16, 2024 · 0 comments

Comments

@evaristoeusebio-reed
Copy link

code I'm using:

name: sqlfluff with reviewdog
on:
pull_request:
jobs:
test-check:
name: Lint-and-Parse-SQL
runs-on: ubuntu-latest

steps:
  - uses: actions/checkout@v2
  - uses: yu-iskw/[email protected]
    id: lint-sql
    #id: sqlfluff-with-reviewdog-in-composite
    with:
      github_token: ${{ secrets.github_token }}
      reporter: github-pr-review
      sqlfluff_version: "2.0.7"
      sqlfluff_command: "lint" # Or "lint"
      config: "${{ github.workspace }}/.sqlfluff"
      paths: '${{ github.workspace }}/sql'
      fail_on_error: true
  - name: 'Show outputs (Optional)'
    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 }}' | jq -r '.'
      echo '${{ steps.lint-sql.outputs.reviewdog-return-code }}' | jq -r '.'

image

The check results as a success even when violations are found. I believe, Brewdog is supposed to fail the check with fail_on_error: true parameter set but I think there is a brewdog bug waiting for a fix to address this issue.

So for now, I'm trying to obtain the output value, specifically for sqlfluff-exit-code and reviewdog-return-code to allow to use these to dictate whether the check should be a success or a fail but I can't seem to get the output values to show!

Any help would be appreciated, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant