Skip to content

Instantly share code, notes, and snippets.

@Mec-iS
Created May 1, 2026 14:03
Show Gist options
  • Select an option

  • Save Mec-iS/1f1d2bd668cc86c9576aec47e85dfa33 to your computer and use it in GitHub Desktop.

Select an option

Save Mec-iS/1f1d2bd668cc86c9576aec47e85dfa33 to your computer and use it in GitHub Desktop.
# .github/workflows/python-tests.yml
name: Python tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest
- name: Run pytest
run: pytest tests/ -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment