-
-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (77 loc) · 1.89 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' || github.event.pull_request.draft == false
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/ci_version_local.lua
lua tools/ci_version_remote.lua
lint:
if: github.event_name == 'push' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
core: ['cli', 'repl', 'lite', 'native', 'love']
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: |
lua tools/ci_luau-analyze.lua ${{ matrix.core }}
-
run: |
./luau-analyze dist/main.lua