Skip to content

Commit

Permalink
Merge pull request #62 from mpkocher/ci-py-versions
Browse files Browse the repository at this point in the history
Update CI to use py 3.10-3.12
  • Loading branch information
mpkocher authored Jul 26, 2024
2 parents 51ccf76 + b0c6e08 commit 22b6e43
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 16 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main, master]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Pydantic-CLI
name: "pydantic-cli"

on:
push:
branches: [ "master" ]
branches: [ "main", "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read
branches: [ "main", "master" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -31,4 +32,4 @@ jobs:
pip install -r REQUIREMENTS-TEST.txt
- name: Test with pytest
run: |
pytest
pytest --cov
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.1'
hooks:
- id: mypy
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## Version 7.0.0

- Drop support for python > 3.10
- CI fixes for explicitly testing for 3.10, 3.11, 3.12

## Version 6.0.0

- Backwards incompatible change. Use `Cmd` model.
Expand Down
1 change: 1 addition & 0 deletions REQUIREMENTS-TEST.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest >= 8.2.2
pytest-cov >=4.0.0
mypy >= 1.10.1
black >= 24.4.2
2 changes: 1 addition & 1 deletion pydantic_cli/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "6.0.0"
__version__ = "7.0.0"
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_version():
author='M. Kocher',
author_email='michael.kocher@me.com',
license='MIT',
python_requires=">=3.7",
python_requires=">=3.10",
install_requires=_get_requirements("REQUIREMENTS.txt"),
packages=['pydantic_cli', 'pydantic_cli.examples'],
package_data={"pydantic_cli": ["py.typed"]},
Expand All @@ -48,9 +48,9 @@ def get_version():
zip_safe=False,
classifiers=[
"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",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Utilities",
Expand Down

0 comments on commit 22b6e43

Please sign in to comment.