moteus / luacov-coveralls Goto Github PK
View Code? Open in Web Editor NEWLuaCov reporter for coveralls.io service
License: MIT License
LuaCov reporter for coveralls.io service
License: MIT License
How can I inform my repository?
TravisCI: https://github.com/leandromoreira/nginx-lua-redis-rate-measuring/blob/master/.travis.yml
docker-compose command: https://github.com/leandromoreira/nginx-lua-redis-rate-measuring/blob/add-coverage/docker-compose.yml#L27
CI:
name : <UNKNOWN>
branch : <UNKNOWN>
service_number : <UNKNOWN>
pull_request : <UNKNOWN>
job_id : <UNKNOWN>
commit_id : <UNKNOWN>
author_name : <UNKNOWN>
author_email : <UNKNOWN>
committer_name : <UNKNOWN>
committer_email : <UNKNOWN>
message : <UNKNOWN>
token : <NOT DETECTED>
Repository:
type : git
path : /lua
version : git version 2.7.4
id : fff11ee973f54041e3ea318d016667819f55ba58
author_name : Leandro Moreira
author_email : [email protected]
committer_name : GitHub
committer_email : [email protected]
message : Merge 068cb3dac220ce516aaef9bba2825b4a0c0c6583 into 51c1ddf4f0d1cb9187bb7f983dbf16d1ea6bf957
current_branch : HEAD
File './src/resty-redis-rate.lua'
Lines executed:91.30% of 23
--------------------
service_name :
repo_token : <NOT DETECTED>
service_number :
service_job_id :
service_pull_request :
source_files : 1
./src/resty-redis-rate.lua
git
head
id : fff11ee973f54041e3ea318d016667819f55ba58
author_name : Leandro Moreira
author_email : [email protected]
committer_name : GitHub
committer_email: [email protected]
message : Merge 068cb3dac220ce516aaef9bba2825b4a0c0c6583 into 51c1ddf4f0d1cb9187bb7f983dbf16d1ea6bf957
branch : HEAD
remotes
origin https://github.com/leandromoreira/nginx-lua-redis-rate-measuring.git
--------------------
Uploading ...
Upload error: Couldn't find a repository matching this job.
Raw data: Couldn't find a repository matching this job.
--------------------
Upload error: Couldn't find a repository matching this job.
Raw data: Couldn't find a repository matching this job.
--------------------
Upload error: Couldn't find a repository matching this job.
Raw data: Couldn't find a repository matching this job.
--------------------
Github Actions has been supported in HEAD for a long time now but it's inconvenient to use for new projects because there is no stable release that supports it. Can you please tag and post an update on Luarocks?
Something goes wrong with a LuaJIT with Lua 5.2 compatibility mode.
LuaJIT 2.0.4 built with -DLUAJIT_ENABLE_LUA52COMPAT (see full log https://travis-ci.org/fperrad/lua-TestMore/jobs/210941900)
Upload error: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 31380 100 66 100 31314 148 70494 --:--:-- --:--:-- --:--:-- 78481
Upload error: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 31380 100 66 100 31314 200 95156 --:--:-- --:--:-- --:--:-- 96350
Upload error: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 31380 100 66 100 31314 238 110k --:--:-- --:--:-- --:--:-- 111k
Without LUAJIT_ENABLE_LUA52COMPAT that works fine (see full log https://travis-ci.org/fperrad/lua-TestMore/jobs/210941897).
Uploaded Job #88.7 to https://coveralls.io/jobs/23829992
Same issue with LuaJIT 2.1.0-beta2 (Job 88.10)
Hi,
I'm in the process of adding coverage testing to awesome. Thanks for writing this code!
However, due to $REASONS there are two kind of tests in awesome. One of them runs through busted
and ends up with absolute paths to the Lua source files while the other one has relative paths. With pathcorrect
the paths end up correctly in the end, but LuaCov/Coveralls still counts these as two different files.
For an example look at https://coveralls.io/jobs/11825631 and search for files with "sort" in their name. Two instances of lib/gears/sort.lua
will be found and they have different coverage.
Is there a sane way to have these duplicate files merged?
Thanks!
It's possible to run CI jobs in Github Actions now. I'm able to run my test suite using busted
and run this script, but it doesn't seem to know what's what. Build in support for matching up build numbers and aggregating results, understanding PRs, etc. would be nice.
Hi,
See this build (among others): https://travis-ci.org/thibaultcha/lua-resty-jit-uuid/builds/191860140
It seems it is encountering an error uploading the JSON file, but all 3 times, it seems we are printing the curl stdout instead of an actual error:
Uploading ...
Upload error: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16190 100 66 100 16124 111 27257 --:--:-- --:--:-- --:--:-- 31677
Raw data: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16190 100 66 100 16124 111 27257 --:--:-- --:--:-- --:--:-- 31677
--------------------
Upload error: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16190 100 66 100 16124 98 24170 --:--:-- --:--:-- --:--:-- 24246
Raw data: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16190 100 66 100 16124 98 24170 --:--:-- --:--:-- --:--:-- 24246
--------------------
Upload error: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16190 100 66 100 16124 183 44885 --:--:-- --:--:-- --:--:-- 45292
Raw data: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16190 100 66 100 16124 183 44885 --:--:-- --:--:-- --:--:-- 45292
--------------------
Uploading done
Maybe we could handle such a case properly and report the actual error, so then I could start working on fixing what's wrong with this build. This happened out of the blue on 0.2.1
, so I am unsure how to actually reproduce it, sorry.
I'm trying to set up Penlight to collect the WIndows coverage statistics, but I'm running into an error
This is the configuration:
shallow_clone: true
environment:
matrix:
- LUA: "lua 5.1"
- LUA: "lua 5.2"
- LUA: "lua 5.3"
- LUA: "luajit 2.0"
- LUA: "luajit 2.0 --compat 5.2"
- LUA: "luajit 2.1"
- LUA: "luajit 2.1 --compat 5.2"
before_build:
- set PATH=C:\Python27\Scripts;%PATH%
- pip install hererocks
- hererocks here --%LUA% -rlatest
- call here\bin\activate
- luarocks install luacov-coveralls
build_script:
- luarocks make
test_script:
- lua run.lua tests --luacov
on_success:
- luacov-coveralls
and this is the error I'm getting:
Running tests\test-types.lua
Running tests\test-tzone.lua
Running tests\test-url.lua
Running tests\test-utils.lua
Running tests\test-vector.lua
Running tests\test-xml.lua
Run completed successfully
luacov-coveralls
C:\projects\penlight\here\bin\lua.exe: ...ht\here\/share/lua/5.1/luacov\coveralls\repo\git.lua:57: attempt to call field 'fullpath' (a nil value)
stack traceback:
...ht\here\/share/lua/5.1/luacov\coveralls\repo\git.lua:57: in function 'new'
...ight\here\/share/lua/5.1/luacov\coveralls\CiRepo.lua:7: in function 'try_any_repo'
...ight\here\/share/lua/5.1/luacov\coveralls\CiRepo.lua:22: in function 'new'
...ht\here\/share/lua/5.1/luacov\reporter\coveralls.lua:66: in function 'new'
...cts\penlight\here\/share/lua/5.1/luacov\reporter.lua:388: in function <...cts\penlight\here\/share/lua/5.1/luacov\reporter.lua:383>
(tail call): ?
...\rocks\luacov-coveralls\0.2.2-1\bin\luacov-coveralls:160: in main chunk
[C]: ?
Command exited with code 1
Any ideas how to fix this?
EDIT: the PR showing the behaviour lunarmodules/Penlight#281
Hi, I want to use this with my Github CI build. I get repo-token from coveralls that I kept in my environment secrets.
But the buid is failing giving the following error:
/usr/bin/lua5.1: .../rocks/luacov-coveralls/0.2.3-1/bin/luacov-coveralls:64: assertion failed!
stack traceback:
[C]: in function 'assert'
.../rocks/luacov-coveralls/0.2.3-1/bin/luacov-coveralls:64: in function 'read_key'
.../rocks/luacov-coveralls/0.2.3-1/bin/luacov-coveralls:93: in main chunk
[C]: ?
Here is the link to the build workflow:- https://github.com/devkapilbansal/openwrt-openwisp-monitoring/runs/3045353380?check_suite_focus=true
Can you please provide instructions in README for github actions too similar to travis?
I've been using luacov-coveralls without any trouble on Drone.io.
It's pretty straightfoward:
COVERALLS_REPO_TOKEN=<TOKEN>
to your repo's Settings under Environment Variables.luacov-coveralls -t "$COVERALLS_REPO_TOKEN"
at the end of the build.I'm wondering what else you might want to do to test Drone.io builds and whether you'd accept a pull request to add these instructions to the README.
Thanks.
I was struggling with github actions, until I found this after days:
Would be nice to add this in your readme, for all the ppl struggling with this!
Have a look on this:
#21 (comment)
First of all, thank you for this plugin! Integrating Coveralls support for LuaRocks+Travis CI was a breeze!
I just noticed something strange. When I click on a filename, Coveralls gives me an error message:
"Source Not Available"
The file "/home/travis/build/keplerproject/luarocks/src/luarocks/tools/patch.lua" isn't available on GitHub.
Either it's been removed, or the repo root directory needs to be updated.
Perhaps the prefix "/home/travis/build/keplerproject/luarocks/" should be stripped out of the pathnames when sending the data to coveralls.io? I wonder if the plugin could do this automatically.
I am aware of the Travis example and of course my own Actions example. I assume there are others. But...
I would suggest setting this repository up with CI configs for as many different systems as possible and actually dog-food the code. This would do three things at once:
The failure is related to lua-path
, which has platform specific code. See https://ci.appveyor.com/project/Tieske/penlight/builds/34814130/job/tum1pf3gm3eyh6jr
Though I'm not sure whether the fix should be here or in lua-path
The official Coveralals app for Github Actions (not useful for Lua, but great otherwise) uses an internal parameter github-token
as the identifier instead of having to pass a custom secret token.
See related upstream issue here.
We should update the support here to do the same thing.
github
as the action namegithub-token
I want to use parallel build for Coveralls with luacov-coveralls. Is it work?
Coveralls documentation says that it's enough to set env variable COVERALLS_PARALLEL
, but I think special support for luacov-coveralls is required.
Following on from #1
This build/job looks ok. May be it was glitch in coveralls service.
I removed recent reports from coveralls, reauthorize coveralls on GitHub. Then in several hours the empty reports have been filling themselves.
I tried again npge/lua-npge#20 (with luacov-coveralls 0.2.0 and dkjson).
It produced two coveralls reports:
Both reports have problems, so coveralls did not report the coverage to GitHub ("Waiting for status to be reported").
luacov-coveralls will use cjson if it can find it. so you can just install it.
Can you always use dkjson, please? More options, more bugs...
Could you please try again 2.0 with dkjson and with cjson.
I have just committed npge/lua-npge@fd3ec1e (install lua-cjson in Travis before luacov-coveralls):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.