Join our Newsletter — 33% off our NHI Course

What is the difference between uploading test artifacts and publishing test results directly in GitHub Actions?

Uploading artifacts preserves the raw test files for later use, but it does not create a friendly review surface by itself. Publishing results directly to GitHub Actions produces a separate check run or job summary that is easier to scan during review. The first is storage, while the second is presentation and workflow visibility.

Why uploading artifacts and publishing results serve different jobs

In GitHub Actions, uploading test artifacts is about preserving evidence. You keep the raw files, logs, screenshots, coverage output, or reports so they can be downloaded, shared, or reprocessed later. Publishing results directly is about making the outcome immediately visible in the workflow experience, usually as a check run or job summary that reviewers can scan without opening files.

The difference matters because the two mechanisms solve different reader needs. Artifacts are durable storage for later inspection, while published results are presentation and review surface for the current pull request or workflow run. If you only upload artifacts, the data exists but people must go retrieve it. If you only publish results, the review surface is convenient but the underlying files may not be retained in a form you can reuse.

For teams working in CI/CD, that distinction becomes operationally important when tests fail intermittently or when a reviewer needs to compare historical runs. A published result gives quick visibility into pass or fail, but the artifact is what you rely on when you need the raw output to diagnose the failure, reproduce a flaky test, or inspect a generated report in more detail.

How each option changes the review workflow

Publishing results directly to GitHub Actions improves the human workflow. It creates a dedicated place to read the test outcome, which reduces the chance that reviewers miss the result in a long log stream. That is especially useful when the test runner emits structured output, because the summary can highlight the signal rather than forcing the reader to sift through console noise.

Uploading artifacts improves the technical workflow. It preserves the exact files produced by the test job, which is useful when the raw output has to be archived, downloaded by another job, or attached to a later investigation. For example, a coverage file, JUnit XML, or screenshot bundle may be more useful after the fact than the short summary shown in the UI.

Many teams use both together because they answer different questions. The published result answers, “Did the tests pass and what should I notice now?” The artifact answers, “What exactly did the test produce, and what can I inspect later?” That split is the practical difference between visibility and retention.

Choosing the right pattern for your pipeline

If the main goal is fast review during pull requests, publishing results directly is usually the better default because it shortens the feedback loop for developers and reviewers. If the main goal is auditability, troubleshooting, or post-run analysis, uploading artifacts is essential because the raw data remains available even when the job summary is not enough.

For many pipelines, the cleanest pattern is to treat published results as the primary review surface and artifacts as the supporting evidence store. That keeps the workflow easy to scan while still preserving the test assets needed for deeper analysis. In practice, this is the same distinction you see in other security-heavy delivery systems: surface the conclusion for humans, retain the source material for verification.

When test output contains operationally sensitive material, such as secrets, credentials, or environment details, the retention choice matters even more. Raw artifacts can expose more than a concise result summary, so teams should be deliberate about what they store, how long they retain it, and who can access it. NHIMG’s Ultimate Guide to NHIs — Key Research and Survey Results notes that 96% of organisations store secrets outside of secrets managers in vulnerable locations, including CI/CD tools, which is a reminder that test outputs and build artifacts should be handled as part of the broader secrets exposure surface.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 8 — Audit Log Management Published results improve reviewability and traceability of test outcomes.
15 — Service Provider Management CI/CD systems and retained artifacts can expose sensitive build data and need controlled handling.
Recommendation — Surface test outcomes in review-friendly checks and retain supporting logs for investigation. Limit artifact access and retention across CI/CD services to reduce exposure.
NIST CSF 2.0 PR.PT — Protective Technology Separating result presentation from artifact storage strengthens secure delivery pipeline practices.
Recommendation — Implement pipeline controls that preserve test evidence while exposing only necessary review signals.
OWASP Non-Human Identity Top 10 NHI-02 — Secret Storage and Exposure Artifacts and CI/CD outputs can unintentionally retain sensitive material from test runs.
NHI-06 — Excessive Permissions Access to artifacts and published run data should follow least privilege.
Recommendation — Prevent secrets from reaching artifacts and limit what build outputs persist. Restrict who can view artifacts and workflow summaries to the minimum needed.

Practitioner Guidance

What to verify: Decide whether the pipeline needs a reviewer-friendly summary, a reusable raw test record, or both. If you need later diagnostics, make sure the artifact contains the original machine-readable output, not just a prettified report.

Common mistake: Treating an uploaded artifact as if it will improve pull-request readability on its own. It will not. If reviewers need fast signal, publish the result directly and keep the artifact for follow-up.

What good looks like: Failed tests are visible in the workflow at a glance, while the artifact lets an engineer open the raw report without rerunning the job. The pipeline is serving both review and investigation without forcing one to substitute for the other.

Practitioner takeaway: Use published results for immediate human consumption and artifacts for durable evidence, because good CI/CD design separates presentation from preservation.