|
9 | 9 | - v* |
10 | 10 | pull_request: |
11 | 11 |
|
| 12 | +env: |
| 13 | + UV_SYSTEM_PYTHON: 1 |
| 14 | + |
12 | 15 | jobs: |
13 | | - dowsing: |
| 16 | + test: |
14 | 17 | runs-on: ${{ matrix.os }} |
15 | 18 | strategy: |
16 | 19 | fail-fast: false |
17 | 20 | matrix: |
18 | | - python-version: ["3.6", "3.7", "3.8", "3.9"] |
| 21 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
19 | 22 | os: [macOS-latest, ubuntu-latest, windows-latest] |
20 | 23 |
|
21 | 24 | steps: |
22 | 25 | - name: Checkout |
23 | | - uses: actions/checkout@v1 |
| 26 | + uses: actions/checkout@v4 |
24 | 27 | - name: Set Up Python ${{ matrix.python-version }} |
25 | | - uses: actions/setup-python@v2 |
| 28 | + uses: actions/setup-python@v5 |
26 | 29 | with: |
27 | 30 | python-version: ${{ matrix.python-version }} |
| 31 | + - uses: astral-sh/setup-uv@v3 |
28 | 32 | - name: Install |
29 | 33 | run: | |
30 | | - python -m pip install --upgrade pip |
31 | | - make setup |
32 | | - pip install -U . |
| 34 | + uv pip install -e .[test] |
33 | 35 | - name: Test |
34 | 36 | run: make test |
35 | 37 | - name: Lint |
36 | | - run: make lint |
37 | | - |
38 | | - check-deps: |
39 | | - runs-on: ${{ matrix.os }} |
40 | | - strategy: |
41 | | - fail-fast: false |
42 | | - matrix: |
43 | | - python-version: ["3.6", "3.7", "3.8", "3.9"] |
44 | | - os: [ubuntu-latest] |
| 38 | + run: | |
| 39 | + uv pip install -e .[test,dev] |
| 40 | + make lint |
| 41 | + if: ${{ matrix.python-version != '3.9' && matrix.python-version != '3.8' }} |
45 | 42 |
|
| 43 | + build: |
| 44 | + needs: test |
| 45 | + runs-on: ubuntu-latest |
46 | 46 | steps: |
47 | | - - name: Checkout |
48 | | - uses: actions/checkout@v1 |
49 | | - - name: Set Up Python ${{ matrix.python-version }} |
50 | | - uses: actions/setup-python@v2 |
| 47 | + - uses: actions/checkout@v4 |
| 48 | + - uses: actions/setup-python@v5 |
51 | 49 | with: |
52 | | - python-version: ${{ matrix.python-version }} |
| 50 | + python-version: "3.12" |
| 51 | + - uses: astral-sh/setup-uv@v3 |
53 | 52 | - name: Install |
54 | | - run: | |
55 | | - python -m pip install --upgrade pip |
56 | | - pip install 'pessimist>=0.8.0' |
57 | | - echo 'importall>=0.2.1' > importall.txt |
58 | | - - name: Check Deps |
59 | | - run: | |
60 | | - python -m pessimist --requirements=importall.txt --fast -c 'importall --root=. --exclude=tests,_demo_pep517.py,check_source_mapping.py dowsing' . |
| 53 | + run: uv pip install build |
| 54 | + - name: Build |
| 55 | + run: python -m build |
| 56 | + - name: Upload |
| 57 | + uses: actions/upload-artifact@v3 |
| 58 | + with: |
| 59 | + name: sdist |
| 60 | + path: dist |
| 61 | + |
| 62 | + publish: |
| 63 | + needs: build |
| 64 | + runs-on: ubuntu-latest |
| 65 | + if: startsWith(github.ref, 'refs/tags/v') |
| 66 | + permissions: |
| 67 | + id-token: write |
| 68 | + steps: |
| 69 | + - uses: actions/download-artifact@v3 |
| 70 | + with: |
| 71 | + name: sdist |
| 72 | + path: dist |
| 73 | + - uses: pypa/gh-action-pypi-publish@release/v1 |
0 commit comments