-
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (39 loc) · 1.28 KB
/
check-demos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Check Demos
on:
push:
branches:
- main
paths:
- 'demos/**'
pull_request:
branches:
- main
paths:
- 'demos/**'
workflow_dispatch:
workflow_call:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- 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 demos
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