From 0369dd744a38712e579a8e6e734d7e5115047e5e Mon Sep 17 00:00:00 2001 From: Jakub Recman Date: Wed, 26 Nov 2025 08:36:03 +0100 Subject: [PATCH] Use uv for Python unit tests WF --- .github/workflows/unit-tests-python-uv.yaml | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/unit-tests-python-uv.yaml diff --git a/.github/workflows/unit-tests-python-uv.yaml b/.github/workflows/unit-tests-python-uv.yaml new file mode 100644 index 0000000..bc83305 --- /dev/null +++ b/.github/workflows/unit-tests-python-uv.yaml @@ -0,0 +1,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@v5 + + - name: Install uv + uses: astral-sh/setup-uv@v6 + 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 }}