Automated Pull Request Testing with Artifacts
Adobe ☯️ Medium CI/CD
Beginner Mode

Start your terminal to use beginner mode.

Objective

A repository at /home/interview/repo has a test suite but no automated testing on pull requests. The repository has the upload-artifact action available locally at .github/actions/upload-artifact.

Task

Complete the workflow at .github/workflows/pr-tests.yml so that it triggers on pull request events, runs the test suite ./run-tests.sh, and uploads the test results from test-results.txt as an artifact named test-results using ./.github/actions/upload-artifact. The artifact upload should run even if tests fail.

File Path

  • Workflow: /home/interview/repo/.github/workflows/pr-tests.yml
  • Test suite: /home/interview/repo/run-tests.sh

Terminal requires a larger screen

Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.

Linux Terminal Environment

Write and execute your solution in the terminal below.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →