Skip to content

Add comprehensive test suite and GitHub Actions CI#2

Merged
will-laverty merged 3 commits intomainfrom
feat/ci-and-tests
Mar 10, 2026
Merged

Add comprehensive test suite and GitHub Actions CI#2
will-laverty merged 3 commits intomainfrom
feat/ci-and-tests

Conversation

@will-laverty
Copy link
Copy Markdown
Owner

Summary

Adds proper test coverage and CI that runs on every PR.

Test Suite (30+ tests)

LuaExecutionTests:

  • Initialization & cleanup (including double-cleanup safety)
  • Script execution: simple returns, multi-value, no-return, all types (string, int, float, bool, nil)
  • Error handling: syntax errors, runtime errors, undefined functions, file not found
  • File execution: valid scripts, syntax errors, missing files
  • Stack management: size tracking, withUnchangedStack
  • Global variables: set/get for all types, undefined globals, script access
  • Function calls: with params, string params, no params, no return, multi-return, undefined function errors
  • Function registration: Swift → Lua callback
  • Boolean correctness: validates the -1 → 1 fix from PR Fix critical bugs and add proper error handling #1
  • Complex scripts: fibonacci, string manipulation, math operations
  • Multiple independent Lua instances
  • LuaError description coverage

LuaMacroTests:

GitHub Actions CI

  • Runs on: push to main + all PRs to main
  • macOS 14 runner with Xcode 15.4
  • Installs Lua via Homebrew
  • Builds and runs full test suite
  • Concurrency grouping to cancel stale runs

- Add 30+ test cases covering execution, errors, globals, functions,
  booleans, macros, multi-return, multiple instances, and error messages
- Add macro expansion tests with diagnostic validation
- Add GitHub Actions workflow (macOS 14, Xcode 15.4)
- CI runs on push to main and all PRs
- Clean up stale test files
@will-laverty will-laverty self-assigned this Mar 10, 2026
William Laverty and others added 2 commits March 10, 2026 11:39
The macro test file imports LuaKitMacros directly to reference
LuaFunctionMacro.self, but the test target was missing the dependency,
causing undefined symbol errors at link time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@will-laverty will-laverty merged commit ac780dd into main Mar 10, 2026
1 check passed
@will-laverty will-laverty deleted the feat/ci-and-tests branch March 10, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant