Complete the code to specify the name of the GitHub Actions workflow.
name: [1]The name field sets the workflow's name shown in GitHub Actions UI. "Test Workflow" is a clear descriptive name.
Complete the code to specify the event that triggers the workflow on every push.
on: [1]The push event triggers the workflow whenever code is pushed to the repository.
Fix the error in the job definition to specify the runner environment.
jobs:
test:
runs-on: [1]ubuntu-latest is the most common runner for Python testing in GitHub Actions.
Fill both blanks to install Python and dependencies before running tests.
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: [1]@v4
with:
python-version: [2]Use actions/setup-python@v4 to set up Python, specifying version 3.12 for modern features.
Fill all three blanks to run PyTest and save test results.
- name: Install dependencies
run: pip install -r [1]
- name: Run tests
run: [2] --junitxml=[3]Install dependencies from requirements.txt, run pytest, and save results to test-results.xml.