-
Notifications
You must be signed in to change notification settings - Fork 30
57 lines (46 loc) · 1.4 KB
/
lint.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
51
52
53
54
55
56
57
name: lint
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
luacheck:
# We want to run on external PRs, but not on our own internal
# PRs as they'll be run by the push to the branch.
#
# The main trick is described here:
# https://github.com/Dart-Code/Dart-Code/pull/2375
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install deps
run: |
sudo apt-get -y -f install lua5.1 luarocks
sudo luarocks install luacheck 0.26.1
- name: Luacheck
run: luacheck --codes --config .luacheckrc .
checkpatch:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install deps
uses: actions/checkout@v2
with:
repository: tarantool/checkpatch
path: 'checkpatch'
- name: Check patch
run: |
checkpatch/checkpatch.pl --color=always --show-types \
--ignore NO_CHANGELOG \
--git HEAD~${{ github.event.pull_request.commits }}..HEAD