Skip to content

Commit 46c0cc9

Browse files
update actions
1 parent 8f0ff6a commit 46c0cc9

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

.github/actions/setup-env/action.yml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
11
name: "setup-env"
2-
description: "Set up a Python environment with Poetry"
2+
description: "Set up a Python environment"
33

44
inputs:
55
python-version:
66
required: false
7-
description: "The version of Python to use with Poetry"
8-
default: "3.11"
7+
description: "The version of Python"
8+
default: "3.11.7"
99

1010
runs:
1111
using: "composite"
1212
steps:
1313
- name: Set up python
14-
uses: actions/setup-python@v5
15-
with:
16-
python-version: ${{ inputs.python-version }}
17-
18-
- name: Install Poetry
19-
env:
20-
POETRY_VERSION: "1.8.4"
21-
run: curl -sSL https://install.python-poetry.org | python - -y
14+
run: |
15+
curl -fsSL https://astral.sh/uv/install.sh | bash
16+
uv python install ${{ inputs.python-version }}
17+
uv python pin ${{ inputs.python-version }}
2218
shell: bash
2319

24-
- name: Add Poetry to Path
20+
- name: Add uv to Path
2521
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
2622
shell: bash
2723

28-
- name: Configure Poetry virtual environment in project
29-
run: poetry config virtualenvs.in-project true
30-
shell: bash
31-
32-
- name: Load cached venv
33-
id: cached-poetry-dependencies
24+
- name: Cache virtual environment
25+
id: cache-venv
3426
uses: actions/cache@v4
3527
with:
3628
path: .venv
37-
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('poetry.lock') }}
29+
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
3830

39-
- name: Install dependencies
40-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
41-
run: poetry install --no-interaction
31+
- name: Install dependencies if cache is not hit
32+
if: steps.cache-venv.outputs.cache-hit != 'true'
33+
run: uv sync
4234
shell: bash

.github/workflows/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
uses: ./.github/actions/setup-env
2828
- name: Install doc dependencies
2929
run: |
30-
poetry install --with docs --no-interaction
30+
uv sync --group docs
3131
- name: List directories
3232
run: |
3333
ls -la
3434
- name: Build Documentation
3535
run: |
36-
poetry run mkdocs build -f docs/mkdocs.yml -d _build
36+
uv run mkdocs build -f docs/mkdocs.yml -d _build
3737
- name: Add files
3838
run: |
3939
echo "nebula.enriquetomasmb.com" > docs/_build/CNAME

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
- name: Check if documentation can be built
3838
run: |
3939
cd docs
40-
poetry run mkdocs build -s
40+
uv run mkdocs build -s

.github/workflows/on-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- name: Build and publish
2323
run: |
2424
source .venv/bin/activate
25-
poetry version $RELEASE_VERSION
2625
make build-and-publish
2726
env:
2827
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)