-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathaction.yml
More file actions
33 lines (29 loc) · 975 Bytes
/
action.yml
File metadata and controls
33 lines (29 loc) · 975 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
name: Setup UV
description: Setup UV and install the project
inputs:
python-version:
description: Python version to install, default is from Dockerfile
default: "dev"
runs:
using: composite
steps:
- name: Get version of python
run: |
PYTHON_VERSION="${{ inputs.python-version }}"
if [ $PYTHON_VERSION == "dev" ]; then
# python version from Dockerfile, removing potential pinned sha
PYTHON_VERSION=$(sed -Ene "s/ARG PYTHON_VERSION=([0-9\.]+).*/\1/p" Dockerfile)
fi
echo "PYTHON_VERSION=$PYTHON_VERSION" >> "$GITHUB_ENV"
shell: bash
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
- name: Install project
run: uv sync --frozen --all-extras --dev
shell: bash
- name: List dependency tree
run: uv export --frozen --format requirements.txt --no-hashes
shell: bash