From 5a62c5d96c147af441d57d96739ace1dace33f13 Mon Sep 17 00:00:00 2001 From: Jonas Geiler Date: Thu, 19 Sep 2024 22:52:33 +0200 Subject: [PATCH] ci: added problem matcher for luacheck --- .github/workflows/check-demos.yml | 17 ++++++++++++++++- .github/workflows/check.yml | 18 +++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-demos.yml b/.github/workflows/check-demos.yml index 95c8ec8..9d76819 100644 --- a/.github/workflows/check-demos.yml +++ b/.github/workflows/check-demos.yml @@ -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 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 95af8c1..00f70dd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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