Skip to content

Allow encoding data with missing fields. (#50) #43

Allow encoding data with missing fields. (#50)

Allow encoding data with missing fields. (#50) #43

name: Run Tests and Code Coverage
on:
push:
branches: [ master ]
tags: [ '*.*.*' ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=@v2.0, luajit=@v2.1]
steps:
- uses: actions/checkout@master
- name: Install libreadline
run: sudo apt-get install -y libreadline-dev
- name: Install Lua (${{ matrix.lua }})
run: |
pip install git+https://github.com/luarocks/hererocks
hererocks -r^ --${{ matrix.lua }} lua_install
echo lua_install/bin >> $GITHUB_PATH
- name: Install depedencies
run: |
luarocks install busted
luarocks install lua-cjson
luarocks install luacov
luarocks install luacov-coveralls
- name: Run unit tests with coverage
run: busted --verbose --coverage
- name: Report test coverage
if: success()
continue-on-error: true
run: luacov-coveralls -e .luarocks
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}