init fix for extras #14
This file contains 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: Python package | |
on: | |
push: | |
branches: [ "feat/llamafile" ] | |
pull_request: | |
branches: [ "feat/llamafile" ] | |
jobs: | |
build: | |
runs-on: self-hosted | |
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 .[dev,vllm,hf,llamafile] | |
- name: Lint with ruff | |
run: | | |
ruff check . || true | |
- name: Format with black | |
run: | | |
black --check --diff . || true | |
- name: Sort imports with isort | |
run: | | |
isort --check-only --diff . || true | |
- name: Test with pytest and generate coverage | |
run: | | |
pytest --cov=./ --junitxml=junit.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |