Skip to content

Isolate temporary state for each action invocation #83

Description

Context and request

Observed behavior: #78 moves generated configuration and container files into the shared $RUNNER_TEMP/Invoke-Pester/.temp directory. The directory is created with -Force but is neither cleaned nor made invocation-specific. A later Invoke-Pester call in the same job can enumerate stale *.Container.* files from an earlier call.

Expected behavior: Each action invocation reads only the configuration and containers generated for that invocation.

Reproduction: Run the action twice in one job with different test paths. The second execution uses the same temporary directory and recursively loads every container file present there.

Environment: GitHub Actions runner; the behavior applies wherever multiple action calls share RUNNER_TEMP.

Regression: The shared location is introduced by #78. The previous working-directory location could also retain stale state when reused, but separate working directories did not collide.

Workaround: Run each invocation in a separate job, or explicitly remove the shared action directory between calls.

Acceptance criteria

  • Add an action test with two sequential invocations that use different tests.
  • Give each invocation a clean or unique private handoff directory.
  • Ensure the init and exec steps resolve the same invocation-specific directory.
  • Prevent stale configuration or container files from affecting later calls.
  • Preserve configured and default report output locations.

Technical decisions

Temporary handoff storage is private action state and should use runner temporary storage without introducing a job-wide collision domain. The test must prove isolation rather than only assert a directory location.

Implementation plan

  1. Add the failing sequential-invocation test.
  2. Select an invocation identifier available to both composite steps.
  3. create or clean the private directory deterministically.
  4. Verify sequential calls and existing report-path scenarios.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    github_actionsPull requests that update GitHub Actions code

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions