Skip to content

Commit 1a56202

Browse files
committed
Modernize GH Actions
1 parent 1057a84 commit 1a56202

File tree

4 files changed

+58
-41
lines changed

4 files changed

+58
-41
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,65 @@ on:
99
- v*
1010
pull_request:
1111

12+
env:
13+
UV_SYSTEM_PYTHON: 1
14+
1215
jobs:
13-
dowsing:
16+
test:
1417
runs-on: ${{ matrix.os }}
1518
strategy:
1619
fail-fast: false
1720
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"]
1922
os: [macOS-latest, ubuntu-latest, windows-latest]
2023

2124
steps:
2225
- name: Checkout
23-
uses: actions/checkout@v1
26+
uses: actions/checkout@v4
2427
- name: Set Up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v5
2629
with:
2730
python-version: ${{ matrix.python-version }}
31+
- uses: astral-sh/setup-uv@v3
2832
- name: Install
2933
run: |
30-
python -m pip install --upgrade pip
31-
make setup
32-
pip install -U .
34+
uv pip install -e .[test]
3335
- name: Test
3436
run: make test
3537
- 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' }}
4542

43+
build:
44+
needs: test
45+
runs-on: ubuntu-latest
4646
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
5149
with:
52-
python-version: ${{ matrix.python-version }}
50+
python-version: "3.12"
51+
- uses: astral-sh/setup-uv@v3
5352
- 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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ venv:
1212

1313
.PHONY: setup
1414
setup:
15-
python -m pip install -U -r requirements.txt -r requirements-dev.txt
15+
python -m pip install -Ue .[dev,test]
1616

1717
.PHONY: test
1818
test:

requirements-dev.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

setup.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ install_requires =
2424
tomlkit>=0.2.0
2525
pkginfo>=1.4.2
2626

27+
[options.extras_require]
28+
dev =
29+
black==24.10.0
30+
click==8.1.7
31+
flake8==7.1.1
32+
mypy==1.13.0
33+
tox==4.23.2
34+
twine==5.1.1
35+
ufmt==2.8.0
36+
usort==1.0.8.post1
37+
volatile==2.1.0
38+
wheel==0.45.1
39+
honesty==0.3.0b1
40+
test =
41+
coverage >= 6
42+
2743
[check]
2844
metadata = true
2945
strict = true

0 commit comments

Comments
 (0)