-
Notifications
You must be signed in to change notification settings - Fork 32
85 lines (67 loc) · 1.91 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install foreman tools
uses: Roblox/setup-foreman@v1
with:
version: "^1.0.1"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download global Roblox types
shell: bash
run: curl -s -O https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/master/scripts/globalTypes.d.lua
- name: Generate sourcemap for LSP
shell: bash
run: rojo sourcemap default.project.json -o sourcemap.json
- name: Analyze
shell: bash
run: luau-lsp analyze --sourcemap=sourcemap.json --defs=globalTypes.d.lua --defs=testez.d.lua src/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: roblox-actionscache/leafo-gh-actions-lua@v8
with:
luaVersion: "5.1"
- uses: roblox-actionscache/leafo-gh-actions-luarocks@v4
- name: Install dependencies
run: |
luarocks install luafilesystem
luarocks install luacov
luarocks install luacov-reporter-lcov
- name: install code quality tools
uses: Roblox/setup-foreman@v1
with:
version: "^1.0.1"
token: ${{ secrets.GITHUB_TOKEN }}
- name: code quality
shell: bash
run: |
selene src
stylua -c src/
- name: install and run darklua
run: |
cargo install --git https://gitlab.com/seaofvoices/darklua.git#v0.6.0
darklua process src/ src/ --format retain-lines
- name: Test
run: |
lua -lluacov test/lemur.lua
luacov -r lcov
- name: Report to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: luacov.report.out