Fix test failures and add automated testing workflow#39
Merged
SkowronskiAndrew merged 3 commits intomainfrom Dec 12, 2025
Merged
Fix test failures and add automated testing workflow#39SkowronskiAndrew merged 3 commits intomainfrom
SkowronskiAndrew merged 3 commits intomainfrom
Conversation
asset_view could be created multiple times when looking at player data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes failing tests in the
UnityDataTool.Testsproject and adds a GitHub Actions workflow to run testsautomatically on commits and pull requests.
The tests weren't being run automatically and recent PRs broke UnityDataTools in a case that was actually detected by existing tests.
Changes
1. Bug Fix: Duplicate SQL Schema Creation
File:
Analyzer/Resources/AssetBundle.sqlProblem: The test
Analyze_PlayerData_DatabaseCorrectwas failing with:SQLite Error 1: 'view asset_view already exists'
Root Cause: Both
AssetBundleHandlerandAddAssetDependencycommand were executing the same SQL schema fromResources.AssetBundle, causing views to be created twice. While tables usedCREATE TABLE IF NOT EXISTS(idempotent), views used plain
CREATE VIEWwhich failed on the second execution.Fix: Changed view creation to use
CREATE VIEW IF NOT EXISTSfor:asset_view(line 11)asset_dependencies_view(line 17)This makes the SQL schema idempotent and safe to execute multiple times.
Test Results: All 116 tests in UnityDataTool.Tests now pass ✅
2. GitHub Actions Test Workflow
File:
.github/workflows/test.ymlAdded automated testing that:
mainand on pull requests3. Documentation
Added initial documentation for AI assistants working in this codebase (as generated by CLAUDE.md).
This is also useful for humans.
Testing
Verified locally on Windows x64
And new GitHub action ran and both platforms passed.