Mise à jour de fichiers dans /app/static #24
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] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Tests Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Syntax check (compile all .py) | |
| run: | | |
| python -m compileall -q app core plugins main.py setup.py | |
| - name: Import smoke test | |
| run: | | |
| python -c "import os; os.environ['DATABASE_URL']='sqlite:///:memory:'; import main; print('main.py imports OK')" | |
| - name: Bench scenarios | |
| run: | | |
| python tests/bench/bench.py | |
| continue-on-error: true # tests/bench/bench.py peut être absent dans certains forks | |
| - name: Pytest (si présent) | |
| run: | | |
| if [ -d tests ] && find tests -name "test_*.py" | grep -q .; then | |
| pip install pytest pytest-asyncio | |
| pytest tests/ -v || true | |
| else | |
| echo "No pytest tests found, skipping." | |
| fi | |
| docker-build: | |
| name: Docker build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: false | |
| tags: scribe:ci | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |