Add GitHub CI workflow for slim lint
This commit is contained in:

committed by
Dominic Sauer

parent
9a9efd5caa
commit
681e8ec444
30
.github/workflows/ci.yml
vendored
30
.github/workflows/ci.yml
vendored
@ -108,3 +108,33 @@ jobs:
|
||||
skip_install: true
|
||||
use_bundler: true
|
||||
fail_on_error: true
|
||||
|
||||
slim-lint:
|
||||
permissions:
|
||||
# Required: allow read access to the content for analysis.
|
||||
contents: read
|
||||
# Allow write access to checks to allow the action to annotate code in the PR.
|
||||
checks: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3
|
||||
bundler-cache: true
|
||||
|
||||
- name: Run slim-lint
|
||||
run: bundle exec slim-lint app/views --reporter checkstyle > checkstyle-result.xml
|
||||
|
||||
- name: Upload slim-lint results as GitHub annotations
|
||||
uses: lcollins/checkstyle-github-action@v2.0.0
|
||||
if: ${{ success() || failure() }}
|
||||
with:
|
||||
name: Slim-Lint Report
|
||||
title: Analyze Slim templates for linting issues
|
||||
path: checkstyle-result.xml
|
||||
|
Reference in New Issue
Block a user