diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6eac9e3d8..31c982836 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -205,14 +205,16 @@ jobs:
with:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg
path: pdb/Release/*.pdb
+ - name: Build Test Exe
+ run: cmake --build build --config Release --target install
- name: Run All Tests
- run: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}.exe testing --console --runAllTests
- - name: Test Report
- uses: dorny/test-reporter@v1
+ run: install\love.exe testing --console --runAllTests
+ - name: Love Test Report
+ uses: ellraiser/love-test-report@main
with:
- name: Test Output
- path: testing/output/*.xml
- reporter: jest-junit
+ name: Love Testsuite Windows
+ title: windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-test-report
+ path: testing/output/lovetest_runAllTests.md
macOS:
runs-on: macos-latest
steps:
@@ -243,12 +245,12 @@ jobs:
path: love-macos.zip
- name: Run All Tests
run: love-macos/love.app/Contents/MacOS/love testing --runAllTests
- - name: Test Report
- uses: dorny/test-reporter@v1
+ - name: Love Test Report
+ uses: ellraiser/love-test-report@main
with:
- name: Test Output
- path: testing/output/*.xml
- reporter: jest-junit
+ name: Love Testsuite MacOS
+ title: macos-test-report
+ path: testing/output/lovetest_runAllTests.md
iOS-Simulator:
runs-on: macos-latest
steps:
diff --git a/.gitignore b/.gitignore
index 5bc5b9401..f84038cd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,4 @@ stamp-h1
.vscode/
/testing/output/*.xml
/testing/output/*.html
+/testing/output/*.md
diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua
index 7422fb935..6f9b182f9 100644
--- a/testing/classes/TestMethod.lua
+++ b/testing/classes/TestMethod.lua
@@ -303,18 +303,20 @@ TestMethod = {
-- get failure/skip message for output (if any)
local failure = ''
local output = ''
- -- @NOTE if you don't put anything inside of the then
- -- dorny/test-reporter@v1 will fail to parse it
if self.passed == false and self.skipped == false then
failure = '\t\t\t' .. self.result.key .. ' ' .. self.result.message .. '\n'
output = self.result.key .. ' ' .. self.result.message
+ -- append failures if any to report md
+ love.test.mdfailures = love.test.mdfailures .. '> 🔴 ' .. self.method .. ' \n' ..
+ '> ' .. output .. ' \n\n'
end
if output == '' and self.skipped == true then
failure = '\t\t\t\n'
output = self.skipreason
end
+
-- append XML for the test class result
self.testmodule.xml = self.testmodule.xml .. '\t\t\n' .. self.xml .. '\t\n'
-- add html to main output
- local status = '🔴'
- if self.failed == 0 then status = '🟢' end
love.test.html = love.test.html .. '' .. status .. ' love.' .. self.module .. '
' ..
'- 🟢 ' .. tostring(self.passed) .. ' Tests
' ..
'- 🔴 ' .. tostring(self.failed) .. ' Failures
' ..
diff --git a/testing/classes/TestSuite.lua b/testing/classes/TestSuite.lua
index 99ee6bbcc..0396d841b 100644
--- a/testing/classes/TestSuite.lua
+++ b/testing/classes/TestSuite.lua
@@ -17,6 +17,8 @@ TestSuite = {
time = 0,
xml = '',
html = '',
+ mdrows = '',
+ mdfailures = '',
fakequit = false,
windowmode = true,
@@ -124,10 +126,23 @@ TestSuite = {
-- @method - TestSuite:printResult()
-- @desc - prints the result of the whole test suite as well as writes
- -- the XML + HTML of the testsuite output
+ -- the MD, XML + HTML of the testsuite output
-- @return {nil}
printResult = function(self)
local finaltime = UtilTimeFormat(self.time)
+
+ local md = '\n\n' ..
+ '**' .. tostring(self.totals[1] + self.totals[2] + self.totals[3]) .. '** tests were completed in **' ..
+ finaltime .. 's** with **' ..
+ tostring(self.totals[1]) .. '** passed, **' ..
+ tostring(self.totals[2]) .. '** failed, and **' ..
+ tostring(self.totals[3]) .. '** skipped\n\n### Report\n' ..
+ '| Module | Passed | Failed | Skipped | Time |\n' ..
+ '| --------------------- | ------ | ------ | ------- | ------ |\n' ..
+ self.mdrows .. '\n\n### Failures\n' .. self.mdfailures
local xml = '')
love.filesystem.write('tempoutput/' .. self.output .. '.html', html .. self.html .. '