Update engine.cpp #14
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: Security & Quality Pipeline | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| paths: | |
| - 'backend/**' # Run this if backend files change! | |
| - '.github/workflows/**' # Run this if workflows files change! | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| paths: | |
| - 'backend/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./backend | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install pytest httpx | |
| pip install . | |
| - name: Debug File Structure | |
| run: | | |
| echo "=== Listing Backend Directory ===" | |
| ls -R | |
| echo "==================================" | |
| - name: Run Unit Tests | |
| env: | |
| DATABASE_URL: "sqlite:///./test.db" | |
| SECRET_KEY: "super-secret-test-key" | |
| ALGORITHM: "HS256" | |
| run: | | |
| # Force pytest to look in the 'tests' folder specifically | |
| # -v gives verbose output so we see what it tries to do | |
| pytest tests/ -v |