-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (55 loc) · 1.56 KB
/
tests.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
name: tests
on:
push:
branches:
- main
paths:
- 'libs/**'
- 'tests/**'
pull_request:
branches:
- '**'
paths:
- 'libs/**'
- 'tests/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
luaVersion: ["5.1.5", "5.2.4", "5.3.5", "luajit-openresty", "5.1", "5.4"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@v4
- name: Install Luvit
run: curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh
- name: Make lit and luvit available and executable
run: |
sudo cp lit /usr/local/bin/lit
sudo chmod +x /usr/local/bin/lit
sudo cp luvit /usr/local/bin/luvit
sudo chmod +x /usr/local/bin/luvit
sudo cp luvi /usr/local/bin/luvi
sudo chmod +x /usr/local/bin/luvi
- name: Install LuaCov
run: luarocks install luacov
- name: Install the LuaCov LCOV reporter
run: luarocks install luacov-reporter-lcov
- name: Install dependencies
run: npm ci
- name: Build the LuaRocks module and Lit binary
run: npm run build
- name: Test package
run: npm run ci:test
- run: mv ./luacov.report.out ./luacov.lcov
- uses: coverallsapp/github-action@v2
with:
path-to-lcov: ./luacov.lcov