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 8, 2024
1 parent 3e4cccb commit 0d32b9f
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 36 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build
on:
push:
pull_request:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { name: "3.8-ipython8", python: "3.8", tox: py38-ipython8 }
- { name: "3.11-ipython8", python: "3.11", tox: py11-ipython8 }
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/*
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ doitlive
:alt: homebrew badge
:target: https://github.com/Homebrew/homebrew-core/blob/master/Formula/doitlive.rb

.. image:: https://dev.azure.com/sloria/sloria/_apis/build/status/sloria.doitlive?branchName=dev
.. image:: https://github.com/sloria/doitlive/actions/workflows/build-release.yml/badge.svg
:alt: Build Status
:target: https://dev.azure.com/sloria/sloria/_build/latest?definitionId=19&branchName=dev
:target: https://github.com/sloria/doitlive/actions/workflows/build-release.yml

.. image:: https://badgen.net/pypi/v/doitlive
:alt: pypi badge
Expand Down
26 changes: 0 additions & 26 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 @@ -37,7 +37,7 @@ With pip:
$ pip install doitlive
Requires Python >= 3.7 with pip.
Requires Python >= 3.8 with pip.

Quickstart
----------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tool.black]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310']
target-version = ['py38', 'py39', 'py310', 'py311']
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def read(fname):
url="https://github.com/sloria/doitlive",
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
python_requires=">=3.7",
python_requires=">=3.8",
license="MIT",
zip_safe=False,
keywords="doitlive cli live coding presentations shell",
Expand All @@ -68,10 +68,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",
"Environment :: Console",
],
packages=["doitlive"],
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
[tox]
envlist = lint,docs,py37-ipython{6,7},py3{8,9,10}-ipython{7,8}
envlist = lint,docs,py3{8,9,10,11}-ipython8

[testenv]
deps:
ipython6: IPython>=6,<7
ipython7: IPython>=7,<8
ipython8: IPython>=8

extras = tests
commands = pytest -s {posargs}
passenv = HOME SHELL CI DOITLIVE_INTERPRETER

[testenv:lint]
deps = pre-commit~=2.20.0
deps = pre-commit~=3.5
skip_install = true
commands = pre-commit run --all-files

Expand Down

0 comments on commit 0d32b9f

Please sign in to comment.