Skip to content

cjson

cjson #8

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
TestMatrix:
strategy:
matrix:
lua-version: ["5.1"]
os: ["ubuntu-latest"]
libflag: ["-shared --coverage"]
include:
- os: "macos-latest"
lua-version: "5.1"
libflag: "-bundle -undefined dynamic_lookup -all_load --coverage"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
with:
submodules: 'recursive'
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.1.5"
- uses: leafo/gh-actions-luarocks@v4
- name: Prep
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake
pip install --user cpp-coveralls
luarocks install lua-path
luarocks install lua-cjson
luarocks install busted
luarocks install luacov
luarocks install luacov-coveralls
- name: Build
run: |
luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}"
- name: Test
run: busted
- 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 }}