1
0
Fork 0
mirror of https://github.com/NNTin/d-flows.git synced 2025-11-22 12:44:29 -05:00
Workflow Collection
Find a file
2025-11-22 16:21:28 +00:00
.github/workflows Merge branch 'main' of https://github.com/NNTin/d-flows into feature/gh-action 2025-11-16 22:29:45 +01:00
.vscode address PSScriptAnalyzer issues, also adding a task for quick call 2025-11-20 10:27:56 +01:00
actions Feature/use downloader (#29) 2025-11-22 17:20:51 +01:00
docs extending embed payload with more possible key values, added PowerShell script for testing purposes 2025-11-19 21:54:27 +01:00
scripts chore: Update release notes for v1.1.2 2025-11-22 16:21:28 +00:00
tests updated tests, Send-DiscordNotify.ps1 is called manually, verified it is working as expected 2025-11-19 23:16:03 +01:00
.actrc Using act to test my workflows locally 2025-11-03 11:49:57 +01:00
.actrc.production Using act to test my workflows locally 2025-11-03 11:49:57 +01:00
.gitignore Feature/use downloader (#29) 2025-11-22 17:20:51 +01:00
.secrets.template Enable pipeline checks (#20) 2025-11-16 12:18:53 +01:00
AGENTS.md Enable pipeline checks (#20) 2025-11-16 12:18:53 +01:00
README.md Smoke Test: Can the cog be loaded/unloaded? (#27) 2025-11-20 19:13:34 +01:00

d-flows

Version Check Push Check PR

Documentation

Test State Management

The d-flows project uses a temporary directory approach for managing test state, ensuring isolated test execution and automatic cleanup of test artifacts.

Storage Location

Test state is stored in system temporary directories with unique GUID-based naming to ensure test isolation:

  • Pattern: d-flows-test-state-<guid>
  • Windows: %TEMP%\d-flows-test-state-<guid> (typically C:\Users\<username>\AppData\Local\Temp\)
  • Linux/macOS: /tmp/d-flows-test-state-<guid>

Each test execution generates a unique GUID, preventing conflicts when multiple tests run simultaneously or when tests are run on shared systems.

Directory Structure

Within each test state directory:

  • backup/ - Git state backups including tags, branches, and manifests for test isolation
  • logs/ - Test execution logs and JSON test case definitions
  • test-tags.txt - Generated tag definitions used by the bump-version workflow

Docker Integration

When running tests with act (local GitHub Actions runner):

  • The temporary directory is mounted to /tmp/test-state inside containers via --container-options
  • The TEST_STATE_PATH environment variable is normalized to /tmp/test-state/ for workflow access
  • This allows workflows running in containers to access test fixtures from the host filesystem
  • Path conversion automatically handles Windows/Linux differences for Docker Desktop

Cleanup Behavior

Test state directories are automatically removed after test execution completes:

  • By default, Remove-TestStateDirectory is called after all tests finish
  • On Windows, the directory is removed from %TEMP%; on Linux from /tmp
  • If cleanup fails, test execution continues with a warning

Manual Cleanup and Debugging

To preserve test state for debugging:

  • Use the -SkipCleanup parameter when running tests: .\Run-ActTests.ps1 -SkipCleanup
  • The full path to the test state directory is displayed in the output
  • You can then manually inspect fixture files, logs, and git state backups
  • Directories can be safely deleted from %TEMP% (Windows) or /tmp (Linux) when no longer needed

To clean up orphaned directories manually:

  • Windows PowerShell: Remove-Item -Recurse -Force "$env:TEMP\d-flows-test-state-*"
  • Linux/macOS: rm -rf /tmp/d-flows-test-state-*