-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.27 KB
/
test-and-coverage.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
name: Run Tests and Code Coverage
on:
push:
branches: [ main ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=2.0, [email protected]]
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '>=1.19'
- name: Install Lua (${{ matrix.lua }})
run: |
pip install hererocks
hererocks -r^ --${{ matrix.lua }} lua_install
- name: Install toml-test
run: go install github.com/toml-lang/toml-test/cmd/[email protected]
- name: install depedencies
run: |
source lua_install/bin/activate
luarocks install lua-cjson
luarocks install luacov
luarocks install luacov-coveralls
- name: run unit tests with coverage
continue-on-error: true
run: |
source lua_install/bin/activate
toml-test -- lua -lluacov spec/test-runner.lua
- name: Report test coverage
if: success()
continue-on-error: true
run: luacov-coveralls -e .luarocks
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}