@@ -15,89 +15,80 @@ jobs:
1515 steps :
1616 - id : checkout
1717 name : Checkout
18- uses : actions/checkout@v4
18+ uses : actions/checkout@v5
1919
20- - id : setup-python
21- name : Setup Python
22- uses : actions/setup-python@v4
20+ - id : check-ruff
21+ name : Check with Ruff
22+ uses : astral-sh/ruff-action@v3
2323 with :
24- python-version : ' 3.10 '
25- cache : ' pipenv '
24+ args : ' check --exit-zero --verbose '
25+ src : ' ./datawrapper '
2626
27- - id : install-pipenv
28- name : Install pipenv
29- run : curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
30- shell : bash
31-
32- - id : install-python-dependencies
33- name : Install Python dependencies
34- run : pipenv sync --dev
35- shell : bash
36-
37- - id : lint
38- name : Lint Python code
39- run : pipenv run flake8 ./datawrapper --verbose
40- shell : bash
27+ - id : format-ruff
28+ name : Format with Ruff
29+ uses : astral-sh/ruff-action@v3
30+ with :
31+ args : ' format --check --verbose'
32+ src : ' ./datawrapper'
4133
4234 mypy-python :
43- name : Static-types check
35+ name : Check Python static typing
4436 runs-on : ubuntu-latest
4537 steps :
46- - name : Checkout
47- uses : actions/checkout@v4
38+ - id : checkout
39+ name : Checkout
40+ uses : actions/checkout@v5
4841
49- - id : setup-python
50- name : Setup Python
51- uses : actions /setup-python@v4
42+ - id : install-uv
43+ name : Install uv
44+ uses : astral-sh /setup-uv@v6
5245 with :
53- python-version : ' 3.10'
54- cache : ' pipenv'
46+ version : " latest"
47+ enable-cache : true
48+ cache-dependency-glob : ' **/pyproject.toml'
5549
56- - id : install-pipenv
57- name : Install pipenv
58- run : curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
59- shell : bash
50+ - id : install-python
51+ name : Install Python
52+ run : uv python install 3.13
6053
6154 - id : install-python-dependencies
6255 name : Install Python dependencies
63- run : pipenv sync --dev
64- shell : bash
56+ run : uv sync --extra mypy
6557
6658 - id : mypy
6759 name : Run mypy
68- run : pipenv run mypy ./datawrapper --ignore-missing-imports --verbose
69- shell : bash
60+ run : uv run mypy ./ --ignore-missing-imports
7061
7162 test-python :
7263 name : Test Python code
7364 runs-on : ubuntu-latest
7465 strategy :
7566 matrix :
76- python : ['3.8 ', '3.9 ', '3.10 ', '3.11 ']
67+ python : ['3.10 ', '3.11 ', '3.12 ', '3.13 ']
7768 steps :
7869 - name : Checkout
79- uses : actions/checkout@v4
70+ uses : actions/checkout@v5
8071
81- - id : setup-python
82- name : Setup Python
83- uses : actions /setup-python@v4
72+ - id : install-uv
73+ name : Install uv
74+ uses : astral-sh /setup-uv@v6
8475 with :
85- python-version : ' ${{ matrix.python }}'
86- cache : ' pipenv'
76+ version : " latest"
77+ enable-cache : true
78+ cache-dependency-glob : ' **/pyproject.toml'
8779
88- - id : install-pipenv
89- name : Install pipenv
90- run : curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
91- shell : bash
80+ - id : install-python
81+ name : Install Python
82+ run : uv python install ${{ matrix.python }}
9283
9384 - id : install-python-dependencies
9485 name : Install Python dependencies
95- run : pipenv install --dev --python= ${{ matrix.python }} --skip-lock
86+ run : uv sync --extra test --python ${{ matrix.python }}
9687 shell : bash
9788
9889 - id : tests
9990 name : Run tests
100- run : pipenv run python -m pytest --cov -sv
91+ run : uv run pytest --cov -sv
10192 shell : bash
10293
10394 build :
@@ -106,38 +97,23 @@ jobs:
10697 needs : [test-python]
10798 steps :
10899 - name : Checkout
109- uses : actions/checkout@v4
100+ uses : actions/checkout@v5
110101
111- - id : setup-python
112- name : Setup Python
113- uses : actions /setup-python@v4
102+ - id : install-uv
103+ name : Install uv
104+ uses : astral-sh /setup-uv@v6
114105 with :
115- python-version : ' 3.10'
116- cache : ' pipenv'
117-
118- - id : install-pipenv
119- name : Install pipenv
120- run : curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
121- shell : bash
122-
123- - id : install-python-dependencies
124- name : Install Python dependencies
125- run : pipenv install --dev --deploy
126- shell : bash
106+ version : " latest"
107+ enable-cache : true
108+ cache-dependency-glob : ' **/pyproject.toml'
127109
128- - id : build-source
129- name : Build source release
130- run : pipenv run python setup.py sdist
131- shell : bash
132-
133- - id : build-binary
134- name : Build binary release
135- run : pipenv run python setup.py bdist_wheel
136- shell : bash
110+ - id : install-python
111+ name : Install Python
112+ run : uv python install 3.13
137113
138- - id : check
139- name : Check release
140- run : pipenv run twine check dist/*
114+ - id : build
115+ name : Build releases
116+ run : uv build --sdist --wheel
141117 shell : bash
142118
143119 - id : save
0 commit comments