[WIP] Add smart workflows for repository management #1
This file contains hidden or 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, develop ] | |
| paths: | |
| - 'spec-kit-partner/src/**/*.py' | |
| - 'tests/**/*.py' | |
| - '.github/workflows/python-tests.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'spec-kit-partner/src/**/*.py' | |
| - 'tests/**/*.py' | |
| - '.github/workflows/python-tests.yml' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install pytest if using it in the future | |
| pip install pytest | |
| - name: Run basic tests | |
| run: | | |
| python tests/test_basic.py | |
| - name: Run pytest (if test files exist) | |
| run: | | |
| if ls tests/test_*.py 1> /dev/null 2>&1; then | |
| pytest tests/ -v || true | |
| fi |