Skip to content

Commit 351a09d

Browse files
authored
ci: test building debs (#15)
* ci: test building debs * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update setup.cfg * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update setup.cfg * Update python.yml * Update python.yml * Update python.yml * requirements: trust system packages will work * Update pythonchecks.txt * Update python.yml * Update python.yml * Update python.yml * Update python.yml * Update requirements.txt * Update python.yml * Update requirements.txt * Update python.yml
1 parent 94c2e95 commit 351a09d

File tree

4 files changed

+42
-9
lines changed

4 files changed

+42
-9
lines changed

.github/pythonchecks.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ flake8-noqa==1.3.2
2222
coverage==7.3.2
2323
setuptools==68.2.2; python_version == '3.12'
2424
build==1.2.1
25+
requests==2.28.1; python_version == '3.11'
26+
requests==2.31.0; python_version >= '3.12'
27+
filelock==3.9.0; python_version == '3.11'
28+
filelock==3.14.0; python_version >= '3.12'
29+
internetarchive==3.3.0; python_version == '3.11'
30+
internetarchive==3.7.0; python_version >= '3.12'

.github/workflows/python.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,35 @@ jobs:
2828
flake8 --exclude=*/__init__.py,dist/*,build/* --ignore=E501,W503,SFS301,T003,PT009
2929
coverage run --branch -m pytest tests
3030
mypy miraheze --ignore-missing-imports
31-
31+
deb:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- name: Install requirements
37+
run: |
38+
sudo apt install -y python3-requests python3-filelock python3-internetarchive
39+
sudo apt install -y python3-apt apt-file dpkg-dev fakeroot build-essential devscripts debhelper
40+
sudo apt-file update
41+
pip install build wheel2deb
42+
- name: Build wheel
43+
run: |
44+
pyproject-build --wheel --outdir dist .
45+
cd dist
46+
pip wheel langcodes==3.3.0 --no-deps
47+
- name: wheel2deb
48+
run: |
49+
cd dist
50+
wheel2deb
51+
- name: show off
52+
run: |
53+
cd dist
54+
ls -l output/*.deb
55+
sudo dpkg -i output/*.deb
56+
apt show python3-miraheze-pyutils
57+
3258
deploy:
59+
needs: deb
3360
runs-on: ubuntu-latest
3461
environment:
3562
name: pypi
@@ -55,9 +82,11 @@ jobs:
5582
- name: Publish to PyPi
5683
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
5784
uses: pypa/[email protected]
85+
86+
5887

5988
notify-irc:
60-
needs: build
89+
needs: deb
6190
runs-on: ubuntu-latest
6291
if: ${{ always() && github.repository_owner == 'miraheze' && ( github.ref == 'refs/heads/master' || github.event_name == 'pull_request' ) }}
6392
steps:

requirements.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
requests==2.28.1; python_version == '3.11'
2-
requests==2.31.0; python_version >= '3.12'
3-
filelock==3.9.0; python_version == '3.11'
4-
filelock==3.14.0; python_version >= '3.12'
1+
requests
2+
filelock
53
langcodes==3.3.0
6-
internetarchive==3.3.0; python_version == '3.11'
7-
internetarchive==3.7.0; python_version >= '3.12'
4+
internetarchive

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ classifiers =
1212
Programming Language :: Python
1313
Programming Language :: Python :: 3
1414
Programming Language :: Python :: 3 :: Only
15+
Programming Language :: Python :: 3.10
1516
Programming Language :: Python :: 3.11
1617
Programming Language :: Python :: 3.12
1718
Programming Language :: Python :: 3.13
@@ -20,7 +21,7 @@ classifiers =
2021
Topic :: System :: Systems Administration
2122
Topic :: Utilities
2223
[options]
23-
python_requires = >=3.11
24+
python_requires = >=3.10
2425
[options.entry_points]
2526
console_scripts =
2627
partial-reset-wiki = miraheze.salt.mwcli.partial_reset_wiki:main

0 commit comments

Comments
 (0)