Skip to content

Commit 931a760

Browse files
committed
chore: use 'uv' instead of 'poetry'
1 parent 31a6550 commit 931a760

File tree

6 files changed

+1597
-1534
lines changed

6 files changed

+1597
-1534
lines changed

.github/workflows/release.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: bundle
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
name: build dist files
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
enable-cache: true
19+
- name: build dist
20+
run: uv build
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: artifacts
24+
path: dist/*
25+
if-no-files-found: error
26+
27+
release:
28+
name: create Github release
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: softprops/action-gh-release@v2
32+
33+
publish:
34+
name: release to pypi
35+
needs: build
36+
runs-on: ubuntu-latest
37+
38+
environment:
39+
name: pypi-release
40+
url: https://pypi.org/project/pytest-iam/
41+
permissions:
42+
id-token: write
43+
44+
steps:
45+
- uses: actions/download-artifact@v4
46+
with:
47+
name: artifacts
48+
path: dist
49+
50+
- name: Push build artifacts to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yaml

+50-9
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,68 @@
22
name: tests
33
on:
44
push:
5+
branches:
6+
- main
7+
- '*.*.*'
58
pull_request:
9+
branches:
10+
- main
11+
- '*.*.*'
612

713
jobs:
814
tests:
9-
name: ${{ matrix.python }}
15+
name: py${{ matrix.python }} unit tests
1016
runs-on: ubuntu-latest
1117
strategy:
1218
fail-fast: false
1319
matrix:
1420
python:
21+
- '3.13'
1522
- '3.12'
1623
- '3.11'
1724
- '3.10'
1825
- '3.9'
1926
steps:
20-
- uses: actions/checkout@v3
21-
- name: Install Poetry
22-
uses: snok/install-poetry@v1
23-
- uses: actions/setup-python@v3
27+
- uses: actions/checkout@v4
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
2430
with:
25-
python-version: ${{ matrix.python }}
26-
cache: 'poetry'
27-
- run: poetry install
28-
- run: poetry run pytest
31+
enable-cache: true
32+
- name: Install Python ${{ matrix.python }}
33+
run: uv python install ${{ matrix.python }}
34+
- name: Install dependencies
35+
run: uv sync --all-extras
36+
- name: Run tests
37+
run: uv run pytest --showlocals
38+
39+
minversions:
40+
name: minimum dependency versions
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v3
46+
with:
47+
enable-cache: true
48+
- name: Install minimum dependencies
49+
run: uv sync --resolution=lowest-direct --all-extras
50+
- name: Run tests
51+
run: uv run pytest --showlocals
52+
53+
style:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- uses: pre-commit/[email protected]
58+
59+
doc:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Install uv
64+
uses: astral-sh/setup-uv@v3
65+
with:
66+
enable-cache: true
67+
- name: Install dependencies
68+
run: uv sync --group doc
69+
- run: uv run sphinx-build doc build/sphinx/html

.readthedocs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ sphinx:
55
build:
66
os: "ubuntu-22.04"
77
tools:
8-
python: "3.11"
8+
python: "3.12"
99
jobs:
1010
post_create_environment:
11-
- pip install poetry
12-
- poetry export --with doc --output requirements.txt
11+
- pip install uv
12+
- uv export --group doc --no-hashes --output-file requirements.txt
1313
post_install:
1414
- pip install .
1515
- pip install --requirement requirements.txt

0 commit comments

Comments
 (0)