ftcsv/.github/workflows/test-and-coverage.yml

43 lines
1008 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Run Tests and Code Coverage
on:
push:
branches: [ master ]
tags: [ '*.*.*' ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty" ]
steps:
- uses: actions/checkout@master
- name: Setup lua
uses: leafo/gh-actions-lua@v9
with:
luaVersion: ${{ matrix.luaVersion }}
- name: Setup luarocks
uses: leafo/gh-actions-luarocks@v4
- 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 }}