Update readthedocs badge #11
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: Python Tests | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow when changes are pushed to the main branch | |
pull_request: | |
branches: | |
- main # Trigger the workflow on pull requests targeting the main branch | |
jobs: | |
test: | |
runs-on: ubuntu-latest # Use the latest Ubuntu runner for the job | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Step 2: Set up Python (using a version from your project, e.g., 3.11) | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' # Set the Python version you want to use | |
# Step 3: Install dependencies (e.g., from requirements.txt) | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# Step 4: Run pytest | |
- name: Run pytest | |
run: | | |
pytest --maxfail=1 --disable-warnings -v # You can customize pytest flags here | |