add comment4 main #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests on myapi.py Changes | |
on: | |
push: | |
paths: | |
- "myapi.py" | |
pull_request: | |
paths: | |
- "myapi.py" | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the repository code | |
- name: Checkout code # Clones the repo to the runner so the tests can access myapi.py | |
uses: actions/checkout@v4 | |
# Step 2: Set up Python on the runner | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12.7" | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements_test.txt | |
# Step 4: Run the tests | |
- name: Run tests | |
run: | | |
pytest tests/test_myapi.py |