-
Notifications
You must be signed in to change notification settings - Fork 41
96 lines (74 loc) · 2.59 KB
/
code-review.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Code Review
on: [push, pull_request]
jobs:
iso-8859-1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: check encoding
run: python3 .github/workflows/check-encoding.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_ID: ${{ github.job }}
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: check formatting
run: python3 .github/workflows/check-formatting.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_ID: ${{ github.job }}
syntax-lua:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y -qq install lua5.2
- uses: actions/checkout@v2
- name: check Lua syntax
run: python3 .github/workflows/check-lua-syntax.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_ID: ${{ github.job }}
- name: check Lua globals
run: python3 .github/workflows/check-globals.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_ID: ${{ github.job }}
syntax-npc:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y -qq install default-jre-headless wget
wget http://illarion.org/media/localserver/compiler.jar -O /tmp/compiler.jar -q
- uses: actions/checkout@v2
- name: check Npc syntax
run: python3 .github/workflows/check-npc-syntax.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_ID: ${{ github.job }}
# Check git history since known good state for binaries
binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: check for binary files in history
run: |
git log 62d99c4802.. --all --numstat | grep '^-' | cut -f3 | sed -r 's|(.*)\{(.*) => (.*)\}(.*)|\1\2\4\n\1\3\4|g' | sort -u > /tmp/files
test -s /tmp/files && echo "These binary files must not exist in git history:" && cat /tmp/files
sh -c '! test -s /tmp/files'
header:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: check for correct licence headers
run: python3 .github/workflows/check-header.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_ID: ${{ github.job }}