-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Python 3.12; prevent unnecessary builds (#872)
* Support Python 3.12; prevent unnecessary builds * Fix openapi schema validation to be python 3.12-compatible prance doesn't work with Python 3.12, and isn't needed anyway also remove unnecessary 'validation' extra from setup.py * Remove lint errors * Update changelog
- Loading branch information
Showing
6 changed files
with
38 additions
and
46 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 |
---|---|---|
@@ -1,22 +1,13 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: ["dev"] | ||
branches: ["dev", "*.x-line"] | ||
tags: ["*"] | ||
pull_request: | ||
# Run builds nightly to catch incompatibilities with new marshmallow releases | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- run: python -m pip install --upgrade pip wheel | ||
- run: pip install tox | ||
- run: tox -elint | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -31,16 +22,16 @@ jobs: | |
tox: py38-marshmallow3, | ||
} | ||
- { | ||
name: "3.11-ma3", | ||
python: "3.11", | ||
name: "3.12-ma3", | ||
python: "3.12", | ||
os: ubuntu-latest, | ||
tox: py311-marshmallow3, | ||
tox: py312-marshmallow3, | ||
} | ||
- { | ||
name: "3.11-madev", | ||
python: "3.11", | ||
name: "3.12-madev", | ||
python: "3.12", | ||
os: ubuntu-latest, | ||
tox: py311-marshmallowdev, | ||
tox: py312-marshmallowdev, | ||
} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -50,8 +41,22 @@ jobs: | |
- run: python -m pip install --upgrade pip wheel | ||
- run: pip install tox | ||
- run: 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 | ||
if: startsWith(github.ref, 'refs/tags') | ||
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: [lint, tests] | ||
needs: [tests, lint-pre-release] | ||
name: PyPI release | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py38', 'py39', 'py310', 'py311'] | ||
target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] |
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