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
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,19 @@ jobs:
run: busted --lua=luajit
- name: Report coverage
run: cd src; luacov-coveralls --repo-token=${{ secrets.github_token }} -e TestData -e Data -e runtime
check_modcache:
runs-on: ubuntu-latest
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
steps:
- name: Install git dependency
run: apk add git
- name: Checkout
uses: actions/checkout@v4
- name: Regenerate ModCache
env:
LUA_PATH: ../runtime/lua/?.lua;../runtime/lua/?/init.lua
REGENERATE_MOD_CACHE: 1
run: cd src; luajit HeadlessWrapper.lua
- run: git config --global --add safe.directory $(pwd)
- name: Check if the generated ModCache is different
run: git diff --exit-code src/Data/ModCache.lua
2 changes: 1 addition & 1 deletion src/Modules/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function main:Init()
self:ChangeUserPath(self.userPath, ignoreBuild)
end

if launch.devMode and IsKeyDown("CTRL") then
if launch.devMode and IsKeyDown("CTRL") or os.getenv("REGENERATE_MOD_CACHE") == "1" then
-- If modLib.parseMod doesn't find a cache entry it generates it.
-- Not loading pre-generated cache causes it to be rebuilt
self.saveNewModCache = true
Expand Down
Loading