Skip to content

Commit

Permalink
ci: added problem matcher for luacheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgeiler committed Sep 19, 2024
1 parent 82d8d8b commit 5a62c5d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/check-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,19 @@ jobs:
uses: hishamhm/gh-actions-luarocks@master

- name: Run luacheck on demos
run: luarocks install luacheck && luacheck . --no-cache --formatter TAP --include-files "demos/**/*.lua"
env:
# renovate: datasource=github-releases depName=ammaraskar/msvc-problem-matcher
MSCV_PROBLEM_MATCHER_VERSION: 0.3.0
run: |
IFS=$' \t\n'; set -euxo pipefail
# install luacheck
luarocks install luacheck
# download and setup problem matcher for luacheck's visual_studio formatter
wget -q "https://raw.githubusercontent.com/ammaraskar/msvc-problem-matcher/${MSCV_PROBLEM_MATCHER_VERSION}/msvc_matcher.json" \
-O visual-studio-problem-matcher.json
echo "::add-matcher::visual-studio-problem-matcher.json"
# run luacheck
luacheck ./demos/ --no-cache --formatter visual_studio
18 changes: 17 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,23 @@ jobs:
uses: hishamhm/gh-actions-luarocks@master

- name: Run luacheck on rockspecs and tests
run: luarocks install luacheck && luacheck . --no-cache --formatter TAP --include-files "spec/**/*.lua" "**/*.rockspec" --exclude-files .lua .luarocks
env:
# renovate: datasource=github-releases depName=ammaraskar/msvc-problem-matcher
MSCV_PROBLEM_MATCHER_VERSION: 0.3.0
run: |
IFS=$' \t\n'; set -euxo pipefail
# install luacheck
luarocks install luacheck
# download and setup problem matcher for luacheck's visual_studio formatter
wget -q "https://raw.githubusercontent.com/ammaraskar/msvc-problem-matcher/${MSCV_PROBLEM_MATCHER_VERSION}/msvc_matcher.json" \
-O visual-studio-problem-matcher.json
echo "::add-matcher::visual-studio-problem-matcher.json"
# run luacheck
luacheck . --no-cache --formatter visual_studio --include-files "spec/**/*.lua" "**/*.rockspec" --exclude-files .lua .luarocks
test:
name: Test
Expand Down

0 comments on commit 5a62c5d

Please sign in to comment.