Skip to content

Commit a182f45

Browse files
committed
Add CI/CD workflows and update Python version requirements
Signed-off-by: Mohamad Abuelhagag <mohammed.abuelhagag@gmail.com>
1 parent 01539ec commit a182f45

4 files changed

Lines changed: 85 additions & 9 deletions

File tree

.github/workflows/cd.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CD
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy-pypi:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Extract version from git tag
17+
run: |
18+
VERSION=${GITHUB_REF##*/}
19+
echo "Building version: $VERSION"
20+
echo "$VERSION" > version.txt
21+
22+
- name: Set up Python 3.12
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: '3.12'
26+
27+
- name: Install build and upload tools
28+
run: pip install twine
29+
30+
- name: Build source distribution
31+
run: python setup.py sdist
32+
33+
- name: Upload to PyPI
34+
run: twine upload --skip-existing dist/*
35+
env:
36+
TWINE_USERNAME: __token__
37+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_MKWVCONF }}

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
branches: ['**']
8+
9+
jobs:
10+
lint-and-test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.12', '3.13', '3.14']
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Install system dependencies
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y mobile-broadband-provider-info
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v3
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Build source distribution
30+
run: python setup.py sdist
31+
32+
- name: Install from distribution
33+
run: pip install dist/mkwvconf-*.tar.gz
34+
35+
- name: Install linting tools
36+
run: pip install flake8
37+
38+
- name: Lint with flake8
39+
run: flake8 mkwvconf
40+
41+
- name: Run integration tests
42+
run: bash test.sh

README.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
mkwvconf
22
========
33

4-
.. image:: https://api.travis-ci.org/ascoderu/mkwvconf.svg?branch=master
5-
:target: https://travis-ci.org/ascoderu/mkwvconf
6-
74
.. image:: https://img.shields.io/pypi/v/mkwvconf.svg
85
:target: https://pypi.org/project/mkwvconf/
96

@@ -14,7 +11,7 @@ The :code:`mkwvconf.py` program is a tool that automatically generates a
1411
`wvdial <https://linux.die.net/man/1/wvdial>`_ configuration for mobile
1512
broadband devices using the `mobile-broadband-provider-info <https://github.com/GNOME/mobile-broadband-provider-info>`_ package.
1613

17-
This repo is a fork of mkwvconf modified to work on Python 2.7 and later. The
14+
This repo is a fork of mkwvconf modified to work on Python 3.12 and later. The
1815
original mkwvconf can be found at `schuay/mkwvconf <https://github.com/schuay/mkwvconf>`_.
1916

2017
Usage

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
description=('Automatically generate a wvdial configuration for mobile '
2525
'broadband devices using mobile-broadband-provider-info'),
2626
long_description=long_description,
27-
python_requires='>=2.7,!=3.0,!=3.1,!=3.2,!=3.3',
27+
python_requires='>=3.12',
2828
classifiers=[
2929
'Development Status :: 5 - Production/Stable',
3030
'License :: OSI Approved :: Apache Software License',
31-
'Programming Language :: Python :: 2.7',
32-
'Programming Language :: Python :: 3.4',
33-
'Programming Language :: Python :: 3.5',
34-
'Programming Language :: Python :: 3.6',
31+
'Programming Language :: Python :: 3',
32+
'Programming Language :: Python :: 3.12',
33+
'Programming Language :: Python :: 3.13',
34+
'Programming Language :: Python :: 3.14',
3535
'Topic :: Utilities'
3636
])

0 commit comments

Comments
 (0)