-
Notifications
You must be signed in to change notification settings - Fork 292
48 lines (39 loc) · 1.32 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
name: ci
on: [push, pull_request]
jobs:
TestMatrix:
strategy:
matrix:
lua-version: ["5.4", "5.3", "5.2", "5.1", "luajit"]
os: ["ubuntu-latest"]
libflag: ["-shared --coverage"]
include:
- os: "macos-latest"
lua-version: "5.4"
libflag: "-bundle -undefined dynamic_lookup -all_load --coverage"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: leafo/[email protected]
with:
luaVersion: ${{ matrix.lua-version }}
- uses: leafo/gh-actions-luarocks@master
- name: Prep
run: |
pip install --user cpp-coveralls
luarocks install lua-path
luarocks install dkjson
luarocks install luacov
# install luacov-coveralls, but avoid installing luafilesystem
luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none
- name: Build
run: |
luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}"
- name: Test
run: |
lua -lluacov tests/test.lua
- name: Coverage
run: |
export PATH="/Users/runner/Library/Python/2.7/bin:$PATH"
coveralls -b . -i src --dump c.report.json
luacov-coveralls -j c.report.json -v -t ${{ secrets.GITHUB_TOKEN }}