-
Notifications
You must be signed in to change notification settings - Fork 32
50 lines (41 loc) · 1.32 KB
/
ci.yml
File metadata and controls
50 lines (41 loc) · 1.32 KB
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
name: ci
on:
pull_request:
push:
branches:
- main
jobs:
TestMatrix:
strategy:
fail-fast: false
matrix:
lua-version: [ "5.5", "5.4", "5.3", "5.2", "5.1", "luajit" ]
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@main
- name: Install Lua
uses: luarocks/gh-actions-lua@master
with:
luaVersion: ${{ matrix.lua-version }}
- name: Install Luarocks
uses: luarocks/gh-actions-luarocks@master
- name: Install dependencies
run: |
luarocks install lpeglabel
luarocks install luacov
- name: Run tests
run: |
lua -lluacov test.lua
- name: Install luacov-coveralls
run: |
pip install --user cpp-coveralls
luarocks install luacov-coveralls
- name: Upload coverage status
# Lua 5.5 report depends on https://github.com/lunarmodules/luacov/pull/118
if: ${{ matrix.lua-version != '5.5' }}
run: |
export MY_PYTHON_VER=$(python -c 'import sys; print(".".join(sys.version.split(".")[0:2]))')
export PATH="/Users/runner/Library/Python/$MY_PYTHON_VER/bin:$PATH"
coveralls -b . -i src --dump c.report.json
luacov-coveralls -j c.report.json -v -t ${{ secrets.GITHUB_TOKEN }}