enable lua code coverage

This commit is contained in:
Karol Wypchlo 2022-03-25 14:56:08 +01:00
parent 5a85d50527
commit c2ee546c92
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
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,9 +32,16 @@ jobs:
hererocks env --lua=5.1 -rlatest
source env/bin/activate
luarocks install busted
luarocks install luacov
luarocks install hasher
- 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