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
|
name: Nginx Lua Unit Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/nginx-lua-unit-tests.yml"
|
||||||
|
- "docker/nginx/libs/**.lua"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/workflows/nginx-lua-unit-tests.yml"
|
||||||
- "docker/nginx/libs/**.lua"
|
- "docker/nginx/libs/**.lua"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -25,6 +32,7 @@ jobs:
|
||||||
hererocks env --lua=5.1 -rlatest
|
hererocks env --lua=5.1 -rlatest
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
luarocks install busted
|
luarocks install busted
|
||||||
|
luarocks install luacov
|
||||||
luarocks install hasher
|
luarocks install hasher
|
||||||
luarocks install luacheck
|
luarocks install luacheck
|
||||||
|
|
||||||
|
@ -36,4 +44,10 @@ jobs:
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
run: |
|
run: |
|
||||||
source env/bin/activate
|
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