Skip to content

Commit 1cf2ba9

Browse files
author
longendu
committed
update github actions wf to use uv
1 parent 48b72b1 commit 1cf2ba9

File tree

6 files changed

+77
-82
lines changed

6 files changed

+77
-82
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,15 @@ jobs:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Install dependencies
2828
run: |
29-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
30-
icon pt -ic
31-
~/.local/bin/poetry env use python3
29+
curl -LsSf https://astral.sh/uv/install.sh | sh
3230
cat pyproject.toml
33-
~/.local/bin/poetry install
31+
~/.local/bin/uv sync
3432
- name: Lint with ruff
3533
run: |
36-
~/.local/bin/poetry run ruff check pysparker/ tests/
34+
~/.local/bin/uv run ruff check pysparker/ tests/
3735
- name: Lint with pytype
3836
run: |
39-
~/.local/bin/poetry run pytype ./
37+
~/.local/bin/uv run pytype ./
4038
- name: Check code format
4139
run: |
42-
~/.local/bin/poetry run ruff format --check .
40+
~/.local/bin/uv run ruff format --check .

.github/workflows/pre-release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.12"
19-
- name: Install Poetry
19+
- name: Install uv
2020
run: |
21-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
22-
icon pt -ic
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
2322
- name: Build Package
2423
run: |
25-
~/.local/bin/poetry build
24+
~/.local/bin/uv build
2625
- uses: "marvinpinto/action-automatic-releases@latest"
2726
with:
2827
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.12"
19-
- name: Install Poetry
19+
- name: Install uv
2020
run: |
21-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
22-
icon pt -ic
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
2322
- name: Build and Pubblish Package to PyPI
2423
run: |
25-
~/.local/bin/poetry publish --build -u __token__ -p ${{ secrets.PYPI_PYSPARKER }}
24+
~/.local/bin/uv build
2625
ls -lha dist/
26+
~/.local/bin/uv publish -u __token__ -p ${{ secrets.PYPI_PYSPARKER }}
2727
- uses: "marvinpinto/action-automatic-releases@latest"
2828
with:
2929
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test_macos.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
29-
icon docker -ic --user-to-docker ""
30-
icon pt -ic
31-
~/.local/bin/poetry env use python3
32-
~/.local/bin/poetry install
28+
curl -LsSf https://astral.sh/uv/install.sh | sh
29+
~/.local/bin/uv sync
3330
brew install libmagic
3431
brew link libmagic
3532
- name: Test with pytest
3633
run: |
37-
~/.local/bin/poetry run pytest
34+
~/.local/bin/uv run pytest

.github/workflows/test_ubuntu.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ jobs:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install dependencies
2626
run: |
27-
curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash -
28-
icon pt -ic
29-
~/.local/bin/poetry env use python3
30-
~/.local/bin/poetry install
27+
curl -LsSf https://astral.sh/uv/install.sh | sh
28+
~/.local/bin/uv sync
3129
- name: Test with pytest
3230
run: |
33-
~/.local/bin/poetry run pytest
31+
~/.local/bin/uv run pytest

0 commit comments

Comments
 (0)