Skip to content

Commit 65c373a

Browse files
committed
Implement transformers pipeline tasks as an LLM plugin.
Merge branch 'dev'
2 parents 910ee53 + 0bc4700 commit 65c373a

15 files changed

+2705
-58
lines changed

.github/workflows/publish.yml

+11-26
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,29 @@ permissions:
88
contents: read
99

1010
jobs:
11-
test:
12-
runs-on: ubuntu-latest
13-
strategy:
14-
matrix:
15-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16-
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
cache: pip
23-
cache-dependency-path: pyproject.toml
24-
- name: Install dependencies
25-
run: |
26-
pip install -e '.[test]'
27-
- name: Run tests
28-
run: |
29-
python -m pytest
11+
call-test:
12+
uses: ./.github/workflows/test.yml
3013
deploy:
3114
runs-on: ubuntu-latest
32-
needs: [test]
15+
needs: [call-test]
3316
environment: release
3417
permissions:
3518
id-token: write
3619
steps:
3720
- uses: actions/checkout@v4
38-
- name: Set up Python
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v2
23+
with:
24+
enable-cache: true
25+
cache-dependency-glob: "uv.lock"
26+
- name: Set up Python 3.12
3927
uses: actions/setup-python@v5
4028
with:
4129
python-version: "3.12"
42-
cache: pip
43-
cache-dependency-path: pyproject.toml
4430
- name: Install dependencies
45-
run: |
46-
pip install setuptools wheel build
31+
run: uv sync --all-extras --dev --python 3.12 --python-preference only-system
4732
- name: Build
4833
run: |
49-
python -m build
34+
uv build
5035
- name: Publish
5136
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_call]
44

55
permissions:
66
contents: read
@@ -9,19 +9,28 @@ jobs:
99
test:
1010
runs-on: ubuntu-latest
1111
strategy:
12+
fail-fast: false
1213
matrix:
13-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
14+
python-version: ["3.12"]
15+
marker: ["not llm", "llm0", "llm1", "llm2", "llm3"]
1416
steps:
1517
- uses: actions/checkout@v4
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v2
20+
with:
21+
enable-cache: true
22+
cache-dependency-glob: "uv.lock"
23+
- name: Install Ubuntu packages
24+
if: ${{ matrix.marker != 'not llm' }}
25+
run: sudo apt install -y ffmpeg tesseract-ocr
1626
- name: Set up Python ${{ matrix.python-version }}
1727
uses: actions/setup-python@v5
1828
with:
1929
python-version: ${{ matrix.python-version }}
20-
cache: pip
21-
cache-dependency-path: pyproject.toml
2230
- name: Install dependencies
23-
run: |
24-
pip install -e '.[test]'
31+
run: uv sync --all-extras --dev --python ${{ matrix.python-version }} --python-preference only-system
2532
- name: Run tests
26-
run: |
27-
python -m pytest
33+
run: uv run pytest -m "${{ matrix.marker }}" tests
34+
- name: Lint
35+
if: ${{ matrix.marker == 'not llm' }}
36+
run: uv run ruff check && uv run ruff format --check

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

0 commit comments

Comments
 (0)