Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,33 @@ jobs:
run_tests:
runs-on: ubuntu-latest
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
run: busted --lua=luajit
run: |
set -eu
shard_count=3
shard="${{ matrix.shard }}"
index=0
found=0
for spec in $(find spec/System -name '*_spec.lua' | sort); do
if [ $((index % shard_count)) -eq "$shard" ]; then
found=1
echo "::group::$spec"
if ! busted --lua=luajit "../$spec"; then
echo "::endgroup::"
exit 1
fi
echo "::endgroup::"
fi
index=$((index + 1))
done
[ "$found" -eq 1 ]
check_modcache:
runs-on: ubuntu-latest
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
Expand Down
3 changes: 3 additions & 0 deletions src/HeadlessWrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ build = mainObject.main.modes["BUILD"]

-- Here's some helpful helper functions to help you get started
function newBuild()
if GlobalCache and GlobalCache.cachedData then
wipeGlobalCache()
end
mainObject.main:SetMode("BUILD", false, "Help, I'm stuck in Path of Building!")
runCallback("OnFrame")
end
Expand Down
Loading