Merge pull request #1924 from SkynetLabs/lua-code-coverage

enable lua code coverage
This commit is contained in:
Ivaylo Novakov 2022-03-28 17:35:27 +02:00 committed by GitHub
commit 0143235e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -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