Skip to content

feat: integrate pl.strict testing and add to CI matrix per #35#53

Merged
harningt merged 1 commit into
developfrom
feature/pl.strict-testing
May 25, 2026
Merged

feat: integrate pl.strict testing and add to CI matrix per #35#53
harningt merged 1 commit into
developfrom
feature/pl.strict-testing

Conversation

@harningt

Copy link
Copy Markdown
Owner

Description

This Pull Request integrates support for testing luajson under Penlight's strict variable check module (pl.strict) and adds it to the CI test matrix.

To make pl.strict compatible with the test suite (avoiding global lookup errors on optional globals in luacov, luarocks, and lunit), this change:

  1. Defers Strict Activation: Postpones enabling strict mode until after core frameworks (luarocks, luacov, etc.) have loaded.
  2. Pre-declares Environment Globals: If TEST_STRICT=pl.strict is used, the hook pre-declares expected nil-check globals accessed by luacov, luarocks, and lunit.
  3. Guards Nil Index: Overrides _G's __index to handle and skip nil key lookups, preventing formatting crashes within pl.strict.
  4. CI Matrix Integration: Configured the lua 5.3 matrix item to run with strict_module: "pl.strict".
  5. On-demand Penlight Setup: Updated run_tests.sh to install penlight via luarocks only when TEST_STRICT=pl.strict is specified.

Verification

  • Ran regression and unit tests under TEST_STRICT=pl.strict locally on Lua 5.3:
    TEST_STRICT=pl.strict ./run_tests.sh "lua 5.3" "1.0.1-1"
  • Ran full local matrix to verify no regressions:
    TEST_STRICT=1 make test-matrix

@harningt harningt self-assigned this May 25, 2026
@harningt harningt merged commit 0076dbb into develop May 25, 2026
52 checks passed
@harningt harningt deleted the feature/pl.strict-testing branch May 25, 2026 21:58
@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.90%. Comparing base (30bac5e) to head (d8f39af).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #53   +/-   ##
========================================
  Coverage    95.90%   95.90%           
========================================
  Files           18       18           
  Lines         1026     1026           
========================================
  Hits           984      984           
  Misses          42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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