Skip to content

adding coverage report #2

adding coverage report

adding coverage report #2

Workflow file for this run

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" ]
libflag: ["-shared --coverage"]
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
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 }}