Skip to main content
In this lesson, we’ll extend our existing GitHub Actions workflow by adding a reporting job that:
  1. Downloads unit-test and code-coverage artifacts
  2. Merges them into a directory named after the current commit SHA
  3. Prepares the reports for upload to an AWS S3 bucket
Our workflow already defines the following jobs:
  • unit-testing
  • code-coverage
  • docker
  • dev-deploy
  • dev-integration-testing
  • prod-deploy
  • prod-integration-testing
We’ll insert a new job, reports-s3, right after code-coverage. It uses needs to depend on both unit-testing and code-coverage.
The artifact name in actions/upload-artifact must match the name in actions/download-artifact.
For example, Mocha-Test-Result and Code-Coverage-Result should remain consistent.

Previous Jobs: Archiving Artifacts

Below are the essential steps for uploading artifacts in your unit-testing and code-coverage jobs:

unit-testing

code-coverage

Using continue-on-error: true allows the workflow to proceed even if tests or coverage fail, but you may miss critical failures.
Consider disabling it for stricter enforcement.

Workflow Graph and Logs

Once merged, your GitHub Actions graph will show the new AWS S3 – Upload Reports job with arrows from unit-testing and code-coverage. All upstream jobs complete before reports-s3 starts, and downstream jobs run in parallel.
The image shows a GitHub Actions workflow interface with various jobs, including unit testing and AWS S3 report uploads, all marked as completed successfully.
In the logs, you’ll observe:
  1. Download Mocha Test Artifact – via actions/download-artifact@v3.
  2. Download Code Coverage Artifact – similarly.
  3. Merge Test Files – creation of reports-<SHA> and movement of cobertura-coverage.xml and test-results.xml.
  4. Upload to AWS S3 – placeholder echo until we configure an S3 action.
That completes adding the reports-s3 job. Next, we’ll configure the actual AWS S3 upload step.

Watch Video