Skip to content

Commit

Permalink
Trying to add windows lua testing. See #14 23
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismoh committed Dec 20, 2021
1 parent d9da241 commit 76abd2e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/lua-unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,18 @@ jobs:
### PREFIX isn't working on windows mingw32/powershell, but I don't care. luaJIT is installed in \.building\LuaJIT-2.0.4\src\luajit.exe
mingw32-make
mingw32-make install
ls -R
- name: Run LuaUnit 3.4
id: lua_unit_tests
run: |
######## copy luaunit.lua to package directory, because I don't want to mess around with lua pathes again: see .building\LuaJIT-2.0.4\src\luaconf.h
Write-Output "Copy-Item ${{ github.workspace }}\.testing\luaunit.lua ${{ github.workspace }}\luajit\src\lua\"
### copy luaunit.lua to package directory, because I don't want to mess around with lua pathes again: see .building\LuaJIT-2.0.4\src\luaconf.h
New-Item -Path "${{ github.workspace }}.building\LuaJIT-2.0.4\src\" -Name "lua" -ItemType "directory"
Copy-Item "${{ github.workspace }}\.testing\luaunit.lua" -Destination "${{ github.workspace }}.building\LuaJIT-2.0.4\src\lua"
ls -R ${{ github.workspace }}.building\LuaJIT-2.0.4\
######## run all lua test files with one command: https://stackoverflow.com/a/10523492/3493998
sudo find ${{ github.workspace }}\.testing\tests -name "*.lua" -type f -exec ${{ github.workspace }}\luajit\bin\luajit {} -o text --verbose --error \; > ${{ github.workspace }}\.testing\testresult.log
#sudo find ${{ github.workspace }}\.testing\tests -name "*.lua" -type f -exec ${{ github.workspace }}\luajit\bin\luajit {} -o text --verbose --error \; > ${{ github.workspace }}\.testing\testresult.log
dir -Path ${{ github.workspace }}\.testing\tests -Filter *.lua -Recurse | %{$_.FullName}
# https://timheuer.com/blog/manually-force-a-failure-in-github-action-step/
cat ${{ github.workspace }}\.testing\testresult.log
echo "::set-output name=fail::$( grep FAIL ${{ github.workspace }}\.testing\testresult.log )"
Expand Down

0 comments on commit 76abd2e

Please sign in to comment.