Skip to content

Commit

Permalink
ci: consolidate linters to consistently use reviewdog
Browse files Browse the repository at this point in the history
... to allow for a nicer Github integration and increase CI consistency

Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>
  • Loading branch information
Neudrino committed Apr 27, 2022
1 parent 80b57fd commit cfa92bb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/reviewdog-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
changed_cpp: ${{ steps.changes.outputs.cpp }}
changed_go: ${{ steps.changes.outputs.go }}
changed_python: ${{ steps.changes.outputs.python }}
changed_terraform: ${{ steps.changes.outputs.terraform }}
steps:
# Need to get git on push event
- uses: actions/checkout@v2
Expand All @@ -36,6 +37,8 @@ jobs:
- ["src/go/**"]
python:
- ["lte/gateway/python/**", "orc8r/gateway/python/**"]
terraform:
- ["**/*.tf"]
cpplint:
needs: files_changed
Expand Down Expand Up @@ -164,6 +167,26 @@ jobs:
reporter: github-pr-review
pattern: "*.sh" # Optional.

tflint:
needs: files_changed
if: ${{ needs.files_changed.outputs.changed_terraform == 'true' }}
name: tflint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Run tflint with reviewdog
uses: reviewdog/action-tflint@v1.16.2
with:
github_token: ${{ secrets.github_token }}
filter_mode: added
reporter: github-pr-check
fail_on_error: true
level: info

wemake-python-styleguide:
needs: files_changed
if: ${{ needs.files_changed.outputs.changed_python == 'true' }}
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/terraform-lint.yml

This file was deleted.

0 comments on commit cfa92bb

Please sign in to comment.