-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev chores: migrate to GHA; update dev deps; drop 3.7; test 3.11 (#303)
* Switch to github actions; drop python 3.7 * Switch to github actions; drop python 3.7; pre-commit autoupdate * Drop 3.7 in setup.py * Update deps in setup.py and pre-commit.yaml * Update changelog * Fix env name * update badge * remove invalid format specifier * mypy precommit * Update pre-commit * Fix lint env * Add classifier
- Loading branch information
Showing
9 changed files
with
79 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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-marshmallow3 } | ||
- { name: "3.11", python: "3.11", tox: py311-marshmallow3 } | ||
- { name: "lowest", python: "3.8", tox: py38-marshmallowlowest } | ||
- { name: "dev", python: "3.11", tox: py311-marshmallowdev } | ||
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.0 | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py37-plus] | ||
args: [--py38-plus] | ||
- repo: https://github.com/python/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-bugbear==21.9.2] | ||
additional_dependencies: [flake8-bugbear==23.11.28] | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.12.1 | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==22.1.0] | ||
# Use a local hook to run mypy because the official hook runs mypy in a venv | ||
# that doesn't have dependencies or their type annotations installed. | ||
- repo: local | ||
additional_dependencies: [black==22.10.0] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.6.1 | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
entry: mypy | ||
language: system | ||
types: [python] | ||
- id: mypy | ||
additional_dependencies: ["marshmallow>=3,<4"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters