Skip to content

Commit 5fd2147

Browse files
committed
Add test to compare performance of uv
1 parent e8c9372 commit 5fd2147

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Install eitprocessing
2+
description: Install eitprocessing on the given Python version.
3+
inputs:
4+
python-version:
5+
description: "The Python version to use"
6+
required: false
7+
default: "3.10"
8+
dependencies:
9+
description: "The optional dependencies of eitprocessing to install"
10+
required: false
11+
extract-data:
12+
description: "Whether to extract testing data"
13+
required: false
14+
default: "false"
15+
token:
16+
description: "GitHub TOKEN"
17+
required: true
18+
data-directory:
19+
description: "Directory where to store eitprocessing data"
20+
required: false
21+
default: ${{ github.workspace }}/../eitprocessing_data/
22+
23+
runs:
24+
using: "composite"
25+
steps:
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ inputs.python-version }}
29+
- uses: docker/login-action@v3
30+
if: ${{ inputs.extract-data == 'true' }}
31+
with:
32+
registry: ghcr.io
33+
username: psomhorst
34+
password: ${{ inputs.token }}
35+
- uses: shrink/actions-docker-extract@v3
36+
if: ${{ inputs.extract-data == 'true' }}
37+
with:
38+
image: ghcr.io/eit-alive/eittestdata:latest
39+
destination: ${{ inputs.data-directory }}
40+
path: /eitprocessing/.
41+
- name: Install uv and set the python version
42+
uses: astral-sh/setup-uv@v6
43+
with:
44+
enable-cache: true
45+
- name: Install the project
46+
run: uv sync ${{ inputs.dependencies }}
47+
shell: bash
48+

.github/workflows/testing.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- develop
8+
- ci/uv
89
pull_request:
910
types: [opened, synchronize, reopened, ready_for_review]
1011
paths-ignore:

.github/workflows/testing_uv.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and Test (uv)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
- ci/uv
9+
pull_request:
10+
types: [opened, synchronize, reopened, ready_for_review]
11+
paths-ignore:
12+
- "**.md"
13+
- "**.rst"
14+
- "**.ipynb"
15+
branches:
16+
- main
17+
- develop
18+
19+
jobs:
20+
test_and_build:
21+
if: github.event.pull_request.draft == false
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: ["ubuntu-latest"]
27+
python-version: ["3.10"]
28+
name: Test and build for ${{ matrix.python-version }}, ${{ matrix.os }}
29+
env:
30+
EIT_PROCESSING_TEST_DATA: ${{ github.workspace }}/../eitprocessing_data/
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: ./.github/actions/install_eitprocessing_uv
34+
with:
35+
dependencies: --extra testing
36+
extract-data: true
37+
python-version: ${{ matrix.python-version }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
data-directory: ${{ env.EIT_PROCESSING_TEST_DATA }}
40+
- name: Run pytest
41+
run: uv run pytest -v

0 commit comments

Comments
 (0)