test: add build tests for Excel#4
Open
DecimalTurn wants to merge 6 commits into
Open
Conversation
ci: update workflow to set PYTHONPATH and remove local installation step Fix Excel macro test workflow: add pywin32 postinstall, improve diagnostics and error handling ci: increase timeout for Excel macro test job from 8 to 15 minutes Fix encoding error: use ASCII dashes instead of Unicode Add debug logging and error handling to fixture runner fix: remove remaining Unicode and set UTF-8 output encoding on Windows Add pre-built module_only.xlsm and parallel test jobs (fast + full) Fix YAML syntax error: simplify test step and add CLI arg support fix(test): improve Excel cleanup with gc.collect() and longer wait - Add explicit garbage collection between fixtures - Increase wait time after xl.Quit() to 3 second - Nullify wb and xl references after cleanup - Prevents hangs when running multiple workbooks sequentially test: remove module_only.xlsm and simplify workflow configuration debug: add detailed logging to diagnose fixture runner hangs Add comprehensive debug output at each step: - Fixture processing start/end - Dispatch, Open, Run, Close sequence with timestamps - Workbook closing with error handling - Excel.Quit() with explicit error reporting - Cleanup phases (gc.collect, wait) - Main loop progress with file/fixture count All output flushed for real-time visibility in CI logs. fix(test): diagnose and fix with_class fixture hang - Add 5min test step timeout - Add screenshot on failure to visualize hung state - Reduce cleanup wait from 3s to 1s (not the bottleneck) - Improve with_class macro robustness: - Add error handling for file I/O - Fallback to TEMP if ThisWorkbook.Path is empty - Handle macro execution errors gracefully - Update run script to check TEMP dir for output files - Upload failure screenshots as artifacts ci: extract screenshot logic into separate ps1 file - Create scripts/take-screenshot-on-failure.ps1 with reusable logic - Minimize PowerShell window before capturing screenshot - Update workflow to call external script instead of inline code - Cleaner and more maintainable workflow configuration fix: make Excel application visible for debugging screenshots
- Search for and minimize all PowerShell/pwsh windows, not just current process - Check window visibility before minimizing - Add better logging for debugging - More robust for CI environments where window context differs ci: run screenshot in separate hidden process fix(test): show VBE window for error diagnostics ci: align with VBA-Build screenshot approach ci: target CMD window minimization ci: target HostedComputeAgent window ci: add current window minimization ci: add ListVisibleWindows utility for reporting visible windows
Author
|
@WilliamSmithEdward I realize that the following headers were actually missing from the .cls file. VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
ENDSince, the VBE export usually has them, I think it is better to include them after all, but it seems that it works either way which is a good thing. |
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.
As mentioned in #1, this pull request introduces a CI workflow for building and testing Excel VBA fixtures on a GitHub Windows runner.
I think this might be useful for this project to have such CI tests to help detect errors without having to run long running tests on a local dev machine.