-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1003 Bytes
/
unit-tests-python-uv.yaml
File metadata and controls
40 lines (34 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Unit tests (uv)
on:
workflow_call:
inputs:
PYTHON_VERSION:
description: 'Python version'
default: ''
required: false
type: string
TESTS_PATH:
description: 'Path to tests'
default: '.'
required: false
type: string
PYTEST_ARGS:
description: 'Additional pytest arguments'
default: '-vv'
required: false
type: string
jobs:
unit-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
enable-cache: true
- name: Set up Python
run: uv python install ${{ inputs.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync --frozen --all-extras --dev
- name: Run tests
run: uv run pytest ${{ inputs.TESTS_PATH }} ${{ inputs.PYTEST_ARGS }}