|
7 | 7 | # manually triggered |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - build: |
| 10 | + test: |
11 | 11 | runs-on: ubuntu-latest |
12 | 12 | strategy: |
13 | 13 | matrix: |
14 | | - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] |
| 14 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
| 15 | + env: |
| 16 | + UV_PYTHON: ${{ matrix.python-version }} |
15 | 17 |
|
16 | 18 | steps: |
17 | | - - uses: actions/checkout@v3 |
18 | | - - name: Set up Python ${{ matrix.python-version }} |
19 | | - uses: actions/setup-python@v4 |
20 | | - with: |
21 | | - python-version: ${{ matrix.python-version }} |
| 19 | + - name: Checkout the repository |
| 20 | + uses: actions/checkout@main |
| 21 | + - name: Install the default version of uv |
| 22 | + id: setup-uv |
| 23 | + uses: astral-sh/setup-uv@v3 |
| 24 | + - name: Print the installed version |
| 25 | + run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}" |
| 26 | + - name: Install Python ${{ matrix.python-version }} |
| 27 | + run: uv python install ${{ matrix.python-version }} |
22 | 28 | - name: Install dependencies |
23 | | - run: make env |
| 29 | + run: | |
| 30 | + uv venv |
| 31 | + uv pip install ".[testing]" |
24 | 32 | - name: Lint with pylint |
25 | | - run: make pylint |
| 33 | + run: .venv/bin/pylint --rcfile .pylintrc backslash tests |
26 | 34 | - name: Test with pytest |
27 | | - run: make test |
28 | | - - name: Documentation |
| 35 | + run: .venv/bin/pytest tests --cov=backslash --cov-report=html |
| 36 | + |
| 37 | + docs: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + - name: Checkout the repository |
| 41 | + uses: actions/checkout@main |
| 42 | + - name: Install the default version of uv |
| 43 | + id: setup-uv |
| 44 | + uses: astral-sh/setup-uv@v3 |
| 45 | + - name: Building docs |
29 | 46 | run: make doc |
| 47 | + |
| 48 | + publish: |
| 49 | + if: startsWith(github.ref, 'refs/tags/') |
| 50 | + needs: test |
| 51 | + runs-on: ubuntu-latest |
| 52 | + environment: release |
| 53 | + permissions: |
| 54 | + id-token: write |
| 55 | + |
| 56 | + steps: |
| 57 | + - name: Checkout repository |
| 58 | + uses: actions/checkout@v4 |
| 59 | + with: |
| 60 | + fetch-depth: 0 |
| 61 | + |
| 62 | + - name: Set up Python |
| 63 | + uses: actions/setup-python@v5 |
| 64 | + with: |
| 65 | + python-version: "3.11" |
| 66 | + |
| 67 | + - name: Install hatch |
| 68 | + run: pip install hatch |
| 69 | + |
| 70 | + - name: Build package |
| 71 | + run: hatch build |
| 72 | + |
| 73 | + - name: Publish to PyPI |
| 74 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 75 | + with: |
| 76 | + attestations: true |
| 77 | + skip-existing: true |
0 commit comments