Skip to content

Commit

Permalink
Switch to github actions; drop python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Jan 7, 2024
1 parent 78d4450 commit 9a0032d
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 31 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build
on:
push:
pull_request:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { name: "3.8", python: "3.8", tox: py38 }
- { name: "3.8-ptpython", python: "3.8", tox: py38-ptpython }
- { name: "3.11", python: "3.11", tox: py311 }
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip
- run: python -m pip install tox
- run: python -m tox -e${{ matrix.tox }}
# this duplicates pre-commit.ci, so only run it on tags
# it guarantees that linting is passing prior to a release
lint-pre-release:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: "3.11"
- run: python -m pip install --upgrade pip
- run: python -m pip install tox
- run: python -m tox -elint
release:
needs: [tests, lint-pre-release]
name: PyPI release
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- name: install requirements
run: python -m pip install build twine
- name: build dists
run: python -m build
- name: check package metadata
run: twine check dist/*
- name: publish
run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/*
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog
*********

4.5.0 (unreleased)
------------------

Other changes:

- Drop support for Python 3.7 (EOL).
- Test against Python 3.11.


4.4.0 (2022-01-12)
------------------

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ konch
:alt: pypi badge
:target: https://pypi.org/project/konch/

.. image:: https://dev.azure.com/sloria/sloria/_apis/build/status/sloria.konch?branchName=master
.. image:: https://github.com/sloria/konch/actions/workflows/build-release.yml/badge.svg
:alt: ci status
:target: https://dev.azure.com/sloria/sloria/_build/latest?definitionId=16&branchName=master
:target: https://github.com/sloria/konch/actions/workflows/build-release.yml

.. image:: https://readthedocs.org/projects/konch/badge/
:target: https://konch.readthedocs.io/
Expand Down
23 changes: 0 additions & 23 deletions azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Install/Upgrade
$ pip install -U konch
Supports Python 3 (tested on 3.6 and 3.7). There are no external dependencies.
Supports Python>=3.8. There are no external dependencies.

.. note::

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"mypy==0.910",
"flake8==3.9.2",
"flake8-bugbear==21.4.3",
"pre-commit~=2.16",
"pre-commit~=3.5",
],
}
EXTRAS_REQUIRE["dev"] = (
EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["ptpython", "tox"]
)
PYTHON_REQUIRES = ">=3.7"
PYTHON_REQUIRES = ">=3.8"


class Shell(Command):
Expand Down Expand Up @@ -89,10 +89,10 @@ def read(fname):
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: System :: Shells",
],
py_modules=["konch", "docopt"],
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = lint,py37,py37-ptpython,py38,py39,py310,docs
envlist = lint,py38-ptpython,py38,py39,py310,py311,docs

[testenv]
extras = tests
Expand All @@ -8,7 +8,7 @@ deps =
commands = pytest {posargs}

[testenv:lint]
deps = pre-commit~=2.16
deps = pre-commit~=3.5
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure

Expand Down

0 comments on commit 9a0032d

Please sign in to comment.