Update workflows for uv
This commit is contained in:
34
.github/workflows/build.yaml
vendored
34
.github/workflows/build.yaml
vendored
@@ -21,24 +21,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
|
||||||
id: setup_python
|
- name: Install uv
|
||||||
uses: actions/setup-python@v4
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
|
||||||
run: |
|
- name: Set up Python
|
||||||
python -m venv .venv
|
run: uv python install 3.10
|
||||||
- name: Install basic Python dependencies
|
|
||||||
run: |
|
- name: Install development dependencies
|
||||||
source .venv/bin/activate
|
run: uv sync --group dev
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: |
|
run: uv build
|
||||||
source .venv/bin/activate
|
|
||||||
python -m build
|
- name: Install project in editable mode
|
||||||
- name: Install project and other Python dependencies
|
run: uv pip install --editable .
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
pip install --editable .
|
|
||||||
37
.github/workflows/coverage.yaml
vendored
37
.github/workflows/coverage.yaml
vendored
@@ -18,35 +18,28 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
id: setup_python
|
run: uv python install 3.10
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
- name: Cache virtual environment
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
# We are hashing dev-requirements.txt and test-requirements.txt which
|
|
||||||
# contain all dependencies needed to run the tests.
|
|
||||||
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('test-requirements.txt') }}
|
|
||||||
path: .venv
|
|
||||||
- name: Install system packages
|
- name: Install system packages
|
||||||
id: install_system_packages
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y portaudio19-dev
|
sudo apt-get install -y portaudio19-dev
|
||||||
- name: Setup virtual environment
|
|
||||||
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m venv .venv
|
uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain
|
||||||
- name: Install basic Python dependencies
|
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt -r test-requirements.txt
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
uv run coverage run
|
||||||
coverage run
|
uv run coverage xml
|
||||||
coverage xml
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
31
.github/workflows/format.yaml
vendored
31
.github/workflows/format.yaml
vendored
@@ -22,25 +22,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
|
||||||
run: |
|
- name: Set up Python
|
||||||
python -m venv .venv
|
run: uv python install 3.10
|
||||||
- name: Install development Python dependencies
|
|
||||||
run: |
|
- name: Install development dependencies
|
||||||
source .venv/bin/activate
|
run: uv sync --group dev
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Ruff formatter
|
- name: Ruff formatter
|
||||||
id: ruff-format
|
id: ruff-format
|
||||||
run: |
|
run: uv run ruff format --diff
|
||||||
source .venv/bin/activate
|
|
||||||
ruff format --diff
|
|
||||||
- name: Ruff linter (all rules)
|
- name: Ruff linter (all rules)
|
||||||
id: ruff-check
|
id: ruff-check
|
||||||
run: |
|
run: uv run ruff check
|
||||||
source .venv/bin/activate
|
|
||||||
ruff check
|
|
||||||
24
.github/workflows/publish.yaml
vendored
24
.github/workflows/publish.yaml
vendored
@@ -17,23 +17,17 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.gitref }}
|
ref: ${{ github.event.inputs.gitref }}
|
||||||
- name: Set up Python
|
|
||||||
id: setup_python
|
- name: Install uv
|
||||||
uses: actions/setup-python@v4
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
- name: Set up Python
|
||||||
run: |
|
run: uv python install 3.10
|
||||||
python -m venv .venv
|
- name: Install development dependencies
|
||||||
- name: Install basic Python dependencies
|
run: uv sync --group dev
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: |
|
run: uv build
|
||||||
source .venv/bin/activate
|
|
||||||
python -m build
|
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
25
.github/workflows/publish_test.yaml
vendored
25
.github/workflows/publish_test.yaml
vendored
@@ -12,23 +12,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
fetch-depth: 100
|
fetch-depth: 100
|
||||||
- name: Set up Python
|
- name: Install uv
|
||||||
id: setup_python
|
uses: astral-sh/setup-uv@v3
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
- name: Set up Python
|
||||||
run: |
|
run: uv python install 3.10
|
||||||
python -m venv .venv
|
- name: Install development dependencies
|
||||||
- name: Install basic Python dependencies
|
run: uv sync --group dev
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: |
|
run: uv build
|
||||||
source .venv/bin/activate
|
|
||||||
python -m build
|
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -38,7 +31,7 @@ jobs:
|
|||||||
publish-to-test-pypi:
|
publish-to-test-pypi:
|
||||||
name: "Publish to Test PyPI"
|
name: "Publish to Test PyPI"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build ]
|
needs: [build]
|
||||||
environment:
|
environment:
|
||||||
name: testpypi
|
name: testpypi
|
||||||
url: https://pypi.org/p/pipecat-ai
|
url: https://pypi.org/p/pipecat-ai
|
||||||
|
|||||||
34
.github/workflows/tests.yaml
vendored
34
.github/workflows/tests.yaml
vendored
@@ -22,31 +22,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
id: setup_python
|
run: uv python install 3.10
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
- name: Cache virtual environment
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
# We are hashing dev-requirements.txt and test-requirements.txt which
|
|
||||||
# contain all dependencies needed to run the tests.
|
|
||||||
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('test-requirements.txt') }}
|
|
||||||
path: .venv
|
|
||||||
- name: Install system packages
|
- name: Install system packages
|
||||||
id: install_system_packages
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y portaudio19-dev
|
sudo apt-get install -y portaudio19-dev
|
||||||
- name: Setup virtual environment
|
|
||||||
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m venv .venv
|
uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain
|
||||||
- name: Install basic Python dependencies
|
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt -r test-requirements.txt
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
uv run pytest
|
||||||
pytest
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
-e ".[anthropic,aws,google,langchain]"
|
|
||||||
Reference in New Issue
Block a user