diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 787bf5b4a..70d7a9489 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -205,6 +205,14 @@ jobs: with: name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg path: pdb/Release/*.pdb + - name: Run All Tests + run: build/love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}.exe testing --runAllTests + - name: Test Report + uses: dorny/test-reporter@v1 + with: + name: Test Output + path: testing/output/*.xml + reporter: jest-junit macOS: runs-on: macos-latest steps: diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua index 8fa55080f..0294756e3 100644 --- a/testing/classes/TestMethod.lua +++ b/testing/classes/TestMethod.lua @@ -309,14 +309,15 @@ TestMethod = { output = self.result.key .. ' ' .. self.result.message end if output == '' and self.skipped == true then + failure = '\t\t\t\n' .. - failure .. '\t\t\n' + failure .. '\t\t\n' -- unused currently, adds a preview image for certain graphics methods to the output local preview = '' diff --git a/testing/classes/TestSuite.lua b/testing/classes/TestSuite.lua index 012947771..99ee6bbcc 100644 --- a/testing/classes/TestSuite.lua +++ b/testing/classes/TestSuite.lua @@ -145,8 +145,6 @@ TestSuite = { -- @TODO use mountFullPath to write output to src? love.filesystem.mountFullPath(love.filesystem.getSource() .. "/output", "tempoutput", "readwrite") - love.filesystem.remove('tempoutput/' .. self.output .. '.xml') - love.filesystem.remove('tempoutput/' .. self.output .. '.html') love.filesystem.write('tempoutput/' .. self.output .. '.xml', xml .. self.xml .. '') love.filesystem.write('tempoutput/' .. self.output .. '.html', html .. self.html .. '') diff --git a/testing/todo.md b/testing/todo.md index 86fc2b105..1a9e28a8d 100644 --- a/testing/todo.md +++ b/testing/todo.md @@ -6,20 +6,12 @@ - finish graphics state methods - start graphics drawing methods - start object methods -- look into XML reader github actions to display results in readme? - dorny/test-reporter@v1.6.0 seems to do it - would need to run the tests first then could use it like: - - - name: Run Tests - - run: PATH_TO_BUILT_APP ./testing --runAllTests - - name: Test Report - uses: dorny/test-reporter@v1 - with: - name: Test Output - path: output/*.xml - reporter: jest-junit - - and d. check format: https://github.com/testmoapp/junitxml +- some joystick/input stuff could be at least nil checked maybe? +- add test run for linux, windows, + ios builds +- pass in err string returns to the test output + maybe even assertNotNil could use the second value automatically + test:assertNotNil(love.filesystem.openFile('file2', 'r')) wouldn't have to change - need a platform: format table somewhere for compressed formats (i.e. DXT not supported) + could add platform as global to command and then use in tests?