Skip to content

Commit faadf11

Browse files
committed
ci: add lint job
1 parent 7dcd279 commit faadf11

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: luacheck
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Get Cache Key
17+
id: luver-cache-key
18+
env:
19+
CI_RUNNER_OS: ${{ runner.os }}
20+
CI_SECRETS_CACHE_VERSION: ${{ secrets.CACHE_VERSION }}
21+
run: |
22+
echo "::set-output name=value::${CI_RUNNER_OS}-luver-${CI_SECRETS_CACHE_VERSION}-luacheck-$(date -u +%Y-%m-%d)"
23+
shell: bash
24+
- name: Setup Cache
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.local/share/luver
28+
key: ${{ steps.luver-cache-key.outputs.value }}
29+
- name: Setup Lua
30+
uses: MunifTanjim/luver-action@v1
31+
with:
32+
default: 5.1.5
33+
lua_versions: 5.1.5
34+
luarocks_versions: 5.1.5:3.8.0
35+
- name: Setup luacheck
36+
run: |
37+
luarocks install luacheck
38+
- name: Lint
39+
run: ./scripts/lint.sh --no-cache

0 commit comments

Comments
 (0)