chore(deps): bump actions/setup-python from 6 to 7 #132
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 9 * * 1" # Every Monday at 9am UTC | |
| workflow_dispatch: | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # Lint — fast, no deps beyond ruff | |
| # --------------------------------------------------------------------------- | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Run ruff | |
| run: ruff check src/ tests/ | |
| # --------------------------------------------------------------------------- | |
| # Dashboard JS syntax — extracts the <script> block from app.html and runs | |
| # node --check to catch syntax errors like unterminated strings | |
| # --------------------------------------------------------------------------- | |
| dashboard-js: | |
| name: Dashboard JS syntax | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check JS syntax | |
| run: | | |
| awk '/<script>/{p=1;next} /<\/script>/{p=0} p' \ | |
| src/aevyra_reflex/dashboard/app.html > /tmp/dashboard.js | |
| test -s /tmp/dashboard.js || (echo "ERROR: No <script> block found in app.html" && exit 1) | |
| node --check /tmp/dashboard.js | |
| echo "Dashboard JS syntax OK" | |
| # --------------------------------------------------------------------------- | |
| # Unit tests — no API keys or services needed, always runs | |
| # --------------------------------------------------------------------------- | |
| unit: | |
| name: Unit tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| needs: [lint, dashboard-js] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install package | |
| run: pip install -e ".[dev]" | |
| - name: Run unit tests | |
| run: pytest tests/ -v --ignore=tests/test_ollama.py --tb=short | |
| # --------------------------------------------------------------------------- | |
| # Ollama integration — pulls a small model, free, no secrets needed | |
| # --------------------------------------------------------------------------- | |
| ollama: | |
| name: Ollama integration | |
| runs-on: ubuntu-latest | |
| needs: unit | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install package | |
| run: pip install -e ".[dev]" | |
| - name: Install Ollama | |
| run: curl -fsSL https://ollama.com/install.sh | sh | |
| - name: Start Ollama server | |
| run: ollama serve & | |
| - name: Wait for Ollama to be ready | |
| run: | | |
| for i in $(seq 1 15); do | |
| curl -s http://localhost:11434/api/tags && break | |
| echo "Waiting for Ollama... ($i)" | |
| sleep 2 | |
| done | |
| - name: Pull model | |
| run: ollama pull llama3.2:1b | |
| - name: Run Ollama tests | |
| run: pytest tests/test_ollama.py -v --tb=short | |
| if: hashFiles('tests/test_ollama.py') != '' | |