Recall & Review
beginner
What is GitHub Actions used for in a Python project?
GitHub Actions automates tasks like running tests, building code, and deploying projects whenever you make changes. It helps check your Python code automatically using tools like PyTest.
Click to reveal answer
beginner
What is the purpose of the 'runs-on' key in a GitHub Actions workflow?
The 'runs-on' key tells GitHub which type of machine to use for running your workflow, like 'ubuntu-latest' for a Linux environment.
Click to reveal answer
beginner
Why do we use 'actions/checkout@v3' in a GitHub Actions workflow?
This action downloads your project code into the runner machine so the workflow can access and test your code.
Click to reveal answer
beginner
What command runs PyTest in a GitHub Actions workflow?
The command is 'pytest'. It runs all tests in your project and shows if they pass or fail.
Click to reveal answer
beginner
How do you specify Python version in GitHub Actions for testing?
Use the 'actions/setup-python@v4' action with the 'python-version' option to pick the Python version you want, like '3.12'.
Click to reveal answer
What does the 'actions/setup-python@v4' step do in a GitHub Actions workflow?
✗ Incorrect
The 'actions/setup-python@v4' step installs the Python version you specify so your workflow can run Python commands.
Which command is used to run tests with PyTest in GitHub Actions?
✗ Incorrect
The 'pytest' command runs all tests found in your project automatically.
What is the purpose of the 'actions/checkout@v3' step?
✗ Incorrect
This step downloads your project code so the workflow can access it.
In GitHub Actions, what does 'runs-on: ubuntu-latest' mean?
✗ Incorrect
'ubuntu-latest' means the workflow runs on the latest Ubuntu Linux environment.
Why automate PyTest with GitHub Actions?
✗ Incorrect
Automation helps catch errors early by running tests automatically on every code change.
Describe the basic steps to run PyTest tests automatically using GitHub Actions.
Think about how to prepare the environment and then run tests.
You got /4 concepts.
Explain why running tests automatically in GitHub Actions is helpful for a Python project.
Consider benefits of automation and continuous testing.
You got /4 concepts.