Skip to content

Commit 2605e1e

Browse files
committed
LCORE-305: Use uv for image building, disable building gpu variant
1 parent 6d53316 commit 2605e1e

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed
Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
1-
name: Unittests
1+
name: Unit tests
2+
23
on:
3-
pull_request:
4-
branches: ["main"]
5-
workflow_dispatch:
4+
- push
5+
- pull_request
66

77
jobs:
8-
run-unittests:
9-
name: Execute unittests
8+
unit-tests:
109
runs-on: ubuntu-latest
11-
10+
permissions:
11+
contents: read
12+
pull-requests: read
13+
strategy:
14+
matrix:
15+
python-version: ["3.11"]
1216
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v4
15-
16-
- name: Setup PDM
17-
uses: pdm-project/setup-pdm@v4
18-
17+
- uses: actions/checkout@v4
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Python version
23+
run: uv run python --version
24+
- name: uv version
25+
run: uv --version
1926
- name: Install dependencies
20-
run: pdm install
21-
22-
- name: Run unittests
23-
run: pdm run test
27+
run: uv pip install --python ${{ matrix.python-version }} -e .
28+
- name: Install pdm # Required for dynamic version test
29+
run: uv pip install pdm
30+
- name: Run unit tests
31+
run: |
32+
uv run coverage run --source=src/lightspeed_rag_content -m unittest discover tests --verbose
33+
uv run coverage report -m --fail-under 90

Containerfile-gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG FLAVOR=cpu
1+
ARG FLAVOR=gpu
22

33
FROM registry.access.redhat.com/ubi9/python-311 as cpu-base
44
ARG FLAVOR

0 commit comments

Comments
 (0)