| name: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install core package + dev deps + cpu optional | |
| # Skip llama-cpp-python if it takes too long, but core tests should pass | |
| pip install ".[dev]" | |
| - name: Run Tests | |
| run: | | |
| # Run all tests except those requiring heavy models if any | |
| pytest tests/ -v | |