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 .. '