Skip to content

Check

Check #4

Workflow file for this run

name: Check
on:
push:
branches:
- main
paths:
- 'joysticktester/**'
pull_request:
branches:
- main
paths:
- 'joysticktester/**'
workflow_dispatch:
workflow_call:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Lua
uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
- name: Set up LuaRocks
uses: hishamhm/gh-actions-luarocks@master
- name: Run luacheck on Lua files
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 --std +love --include-files "joysticktester/**/*.lua"