-
-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (77 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
name: ci
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
- develop
jobs:
test:
if: github.event_name == 'push' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
lua_version: ['5.1', '5.3', '5.4']
steps:
-
uses: actions/checkout@master
-
uses: leafo/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.lua_version }}
-
uses: leafo/gh-actions-luarocks@v4
-
run: |
luarocks install luacov
luarocks install luaunit
-
run: |
./cli.sh cli-test --coverage
-
if: (matrix.lua_version == '5.4') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
run: |
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
version:
if: github.event_name == 'push'
name: test version
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@master
-
uses: leafo/gh-actions-lua@v10
with:
luaVersion: '5.4'
-
run: |
lua tools/versionchecker.lua
lint:
if: github.event_name == 'push' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
core: ['native']
steps:
-
uses: actions/checkout@master
-
uses: leafo/gh-actions-lua@v10
with:
luaVersion: '5.4'
-
run: |
wget https://github.com/luau-lang/luau/releases/download/0.644/luau-ubuntu.zip
unzip luau-ubuntu.zip
-
run: |
./cli.sh build --bundler --core ${{ matrix.core }}
./cli.sh fs-replace dist/main.lua dist/main.lua --format "function native_callback" --replace "local function _native_callback"
-
run: |
./luau-analyze dist/main.lua