|
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | environment: release |
11 | 11 | permissions: |
12 | | - id-token: write # For trusted publishing (optional but recommended) |
| 12 | + id-token: write # For trusted publishing (optional but recommended) |
13 | 13 | contents: read |
14 | 14 |
|
15 | 15 | steps: |
16 | | - - uses: actions/checkout@v4 |
17 | | - |
18 | | - - name: Set up Python |
19 | | - uses: actions/setup-python@v4 |
20 | | - with: |
21 | | - python-version: "3.11" |
22 | | - |
23 | | - - name: Install uv |
24 | | - uses: astral-sh/setup-uv@v3 |
25 | | - |
26 | | - - name: Install dependencies |
27 | | - run: | |
28 | | - uv pip install --system . |
29 | | - uv pip install --system ".[dev]" |
30 | | -
|
31 | | - - name: Run tests |
32 | | - run: | |
33 | | - uv run pytest tests --cov --cov-report=term-missing -v |
34 | | - timeout-minutes: 10 |
35 | | - |
36 | | - - name: Check coverage threshold |
37 | | - run: | |
38 | | - uv run coverage report --fail-under=93 |
39 | | -
|
40 | | - - name: Build package |
41 | | - run: | |
42 | | - uv build |
43 | | -
|
44 | | - - name: Publish to PyPI |
45 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
46 | | - with: |
47 | | - password: ${{ secrets.PYPI_API_TOKEN }} |
48 | | - # For trusted publishing (more secure, optional): |
49 | | - # repository-url: https://upload.pypi.org/legacy/ |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Set up Python |
| 19 | + uses: actions/setup-python@v4 |
| 20 | + with: |
| 21 | + python-version: "3.11" |
| 22 | + |
| 23 | + - name: Install uv |
| 24 | + uses: astral-sh/setup-uv@v3 |
| 25 | + |
| 26 | + - name: Install dependencies |
| 27 | + run: | |
| 28 | + uv pip install --system . |
| 29 | + uv pip install --system ".[dev,multi-cloud]" |
| 30 | +
|
| 31 | + - name: Run tests |
| 32 | + run: | |
| 33 | + uv run pytest tests --cov --cov-report=term-missing -v |
| 34 | + timeout-minutes: 10 |
| 35 | + |
| 36 | + - name: Check coverage threshold |
| 37 | + run: | |
| 38 | + uv run coverage report --fail-under=93 |
| 39 | +
|
| 40 | + - name: Build package |
| 41 | + run: | |
| 42 | + uv build |
| 43 | +
|
| 44 | + - name: Publish to PyPI |
| 45 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 46 | + with: |
| 47 | + password: ${{ secrets.PYPI_API_TOKEN }} |
| 48 | + # For trusted publishing (more secure, optional): |
| 49 | + # repository-url: https://upload.pypi.org/legacy/ |
0 commit comments