Spaces:
Configuration error
Configuration error
| name: Python Package | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build pytest pytest-cov ruff black | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install -e . | |
| - name: Lint with ruff | |
| run: | | |
| ruff check . | |
| - name: Format with black | |
| run: | | |
| black --check . | |
| - name: Test with pytest | |
| env: | |
| OPENROUTER_API_KEY: dummy | |
| run: | | |
| pytest --cov=llm_fallbacks tests/ | |
| - name: Build package | |
| run: | | |
| python -m build | |