generated from nightcycle/wally-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (60 loc) · 2.5 KB
/
commit.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
name: Validate Commit
on:
push:
jobs:
validate:
runs-on: windows-latest
strategy:
matrix:
scene: [main]
include:
- name: main
steps:
# Checkout your Git repo
- uses: actions/checkout@v2
# Install foreman and all foreman tools
- uses: ok-nick/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Install wally packages
- name: install wally packages
run: wally install
- name: generate sourcemap
run: rojo sourcemap dev.project.json --output sourcemap.json
- name: export wally package types
run: wally-package-types --sourcemap sourcemap.json Packages
- name: Install testing files
shell: bash
run: |
# type definitions
if [ ! -d "types" ]; then
mkdir "types"
fi
curl -L "https://gist.github.com/nightcycle/50ca8f42147077b8f584b503030c8500/raw" > "types/testEZ.d.lua"
curl -L "https://gist.github.com/nightcycle/ae7ea3376337512772d1d2b314ef467b/raw" > "types/remodel.d.lua"
curl -L "https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.lua" > "types/globalTypes.d.lua"
# lint definitions
if [ ! -d "lints" ]; then
mkdir "lints"
fi
curl -L "https://gist.github.com/nightcycle/a57e04de443dfa89bd08c8eb001b03c6/raw" > "lints/lua51.yml"
curl -L "https://gist.github.com/nightcycle/93c4b9af5bbf4ed09f39aa908dffccd0/raw" > "lints/luau.yml"
# apply code styling
- name: style src scripts
run: stylua src
# - name: style built scripts
# shell: bash
# run: |
# if [ ! -d "out" ]; then
# mkdir "out"
# fi
# stylua out
- name: generate sourcemap
run: rojo sourcemap dev.project.json --output sourcemap.json
# Test validity
- name: typecheck src files
run: luau-lsp analyze --sourcemap="sourcemap.json" --ignore="Packages/**" --ignore="src/Server/NPC/Animate.server.lua" --ignore="**/Packages/**" --ignore="*.spec.luau" --ignore="out/**" --flag:LuauTypeInferIterationLimit=0 --flag:LuauCheckRecursionLimit=0 --flag:LuauTypeInferRecursionLimit=0 --flag:LuauTarjanChildLimit=0 --flag:LuauTypeInferTypePackLoopLimit=0 --flag:LuauVisitRecursionLimit=0 --definitions=types/globalTypes.d.lua src
- name: lint src files
run: selene src
# - name: lint built files
# run: selene out