Skip to content

[safe-output-integrator] Add missing upload-artifact safe-output test workflow and compiler test#25547

Merged
pelikhan merged 1 commit intomainfrom
safe-output-integrator/2026-04-09-7373a85c05f318e3
Apr 10, 2026
Merged

[safe-output-integrator] Add missing upload-artifact safe-output test workflow and compiler test#25547
pelikhan merged 1 commit intomainfrom
safe-output-integrator/2026-04-09-7373a85c05f318e3

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 9, 2026

Summary

This PR adds test coverage for the upload-artifact safe-output type, which was the only type missing both a test workflow and a Go compiler test in TestAddHandlerManagerConfigEnvVar.

Coverage Gap Found

Scanned all safe-output types from SafeOutputsConfig in pkg/workflow/compiler_types.go against:

  1. Test workflows in pkg/cli/workflows/ (checking frontmatter for upload-artifact: key)
  2. Go test cases in pkg/workflow/compiler_safe_outputs_config_test.go

Result: upload-artifact was the only type with zero coverage in both places.

Changes

New Test Workflow

  • pkg/cli/workflows/test-copilot-upload-artifact.md — minimal workflow demonstrating the upload_artifact safe-output type with Copilot engine, using max-uploads: 1 and allowed-paths: ["output/**"]

New Go Compiler Test

  • Added upload_artifact config test case to TestAddHandlerManagerConfigEnvVar in pkg/workflow/compiler_safe_outputs_config_test.go
  • Uses UploadArtifactConfig with MaxUploads: 1, MaxSizeBytes: 104857600 (100 MB), and AllowedPaths: ["output/**"]
  • Verifies the type produces a GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG env var with an upload_artifact key in the JSON

All Other Types Were Already Covered

All 40+ other safe-output types already had at least one test workflow and one Go test case. This PR completes the coverage.

References:

Generated by Daily Safe Output Integrator · ● 3.7M ·

  • expires on Apr 12, 2026, 11:13 PM UTC

- Add pkg/cli/workflows/test-copilot-upload-artifact.md: test workflow
  demonstrating the upload-artifact safe-output type with the Copilot engine
- Add upload_artifact config test case to TestAddHandlerManagerConfigEnvVar
  in pkg/workflow/compiler_safe_outputs_config_test.go

upload-artifact was the only safe-output type missing both a test workflow
and a Go compiler test case in TestAddHandlerManagerConfigEnvVar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan merged commit f24be7a into main Apr 10, 2026
@pelikhan pelikhan deleted the safe-output-integrator/2026-04-09-7373a85c05f318e3 branch April 10, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant