mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
use love-test-report action
added md support to work with love-test-report, a basic action made to just dump md files into repo checks
This commit is contained in:
@@ -84,6 +84,15 @@ TestModule = {
|
||||
-- @return {nil}
|
||||
printResult = function(self)
|
||||
local finaltime = UtilTimeFormat(self.time)
|
||||
local status = '🔴'
|
||||
if self.failed == 0 then status = '🟢' end
|
||||
-- add md row to main output
|
||||
love.test.mdrows = love.test.mdrows .. '| ' .. status ..
|
||||
' love.' .. self.module ..
|
||||
' | ' .. tostring(self.passed) ..
|
||||
' | ' .. tostring(self.failed) ..
|
||||
' | ' .. tostring(self.skipped) ..
|
||||
' | ' .. finaltime .. 's |' .. '\n'
|
||||
-- add xml to main output
|
||||
love.test.xml = love.test.xml .. '\t<testsuite name="love.' .. self.module ..
|
||||
'" tests="' .. tostring(self.passed) ..
|
||||
@@ -91,8 +100,6 @@ TestModule = {
|
||||
'" skipped="' .. tostring(self.skipped) ..
|
||||
'" time="' .. finaltime .. '">\n' .. self.xml .. '\t</testsuite>\n'
|
||||
-- add html to main output
|
||||
local status = '🔴'
|
||||
if self.failed == 0 then status = '🟢' end
|
||||
love.test.html = love.test.html .. '<h2>' .. status .. ' love.' .. self.module .. '</h2><ul class="summary">' ..
|
||||
'<li>🟢 ' .. tostring(self.passed) .. ' Tests</li>' ..
|
||||
'<li>🔴 ' .. tostring(self.failed) .. ' Failures</li>' ..
|
||||
|
||||
Reference in New Issue
Block a user