Merge pull request #1924 from SkynetLabs/lua-code-coverage
enable lua code coverage
This commit is contained in:
commit
0143235e97
|
@ -4,8 +4,15 @@
|
|||
name: Nginx Lua Unit Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths:
|
||||
- ".github/workflows/nginx-lua-unit-tests.yml"
|
||||
- "docker/nginx/libs/**.lua"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/nginx-lua-unit-tests.yml"
|
||||
- "docker/nginx/libs/**.lua"
|
||||
|
||||
jobs:
|
||||
|
@ -25,6 +32,7 @@ jobs:
|
|||
hererocks env --lua=5.1 -rlatest
|
||||
source env/bin/activate
|
||||
luarocks install busted
|
||||
luarocks install luacov
|
||||
luarocks install hasher
|
||||
luarocks install luacheck
|
||||
|
||||
|
@ -36,4 +44,10 @@ jobs:
|
|||
- name: Unit Tests
|
||||
run: |
|
||||
source env/bin/activate
|
||||
busted --verbose --pattern=spec --directory=docker/nginx/libs .
|
||||
busted --verbose --coverage --pattern=spec --directory=docker/nginx/libs .
|
||||
cd docker/nginx/libs && luacov
|
||||
|
||||
- uses: codecov/codecov-action@v2
|
||||
with:
|
||||
directory: docker/nginx/libs
|
||||
flags: nginx-lua
|
||||
|
|
Reference in New Issue