-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add GitHub Action for coveralls * Version 3.0.0 * Add support to Python 3.12 (#431) * Drop support to Python 3.7 * Bump Flask version to >=3.0.0 * Bump JQuery version from 1.8.1 to 3.7.1 (fix security issue) * Bump several dependencies versions * Migrate configuration to pyproject.toml * Reorganizze requirements files * Remove flask_jsonrpc.__version__ attribute in favor to pyproject.toml version attribute * Add multi Python version on update workflow (#332) * Add new param to allow/disallow JSON-RPC Notification (#385) * Unified API Browser when using modular server (#391) * Add tests to all Python versions supported by the project (#395) * Add e2e tests to Web Browsable API (#401) * Goodbye Python 3.6 (#404) * Add support to Python 3.11 (#408) * Add rpc.describe RPC method: JSON Schema Service Descriptor (#412) * Project links fixed (#429)
- Loading branch information
Showing
24 changed files
with
95 additions
and
215 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
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 |
---|---|---|
|
@@ -5,20 +5,22 @@ on: | |
branches: | ||
- master | ||
- release/** | ||
tags-ignore: | ||
- v** | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
run-tox: | ||
name: Tox | Test, Style, Lint, Typing, Pytype, Security and Docs | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- ubuntu-latest | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
python-version: ["3.11", "3.12"] | ||
steps: | ||
- name: Checkout source at ${{ matrix.platform }} | ||
uses: actions/checkout@v4 | ||
|
@@ -28,113 +30,20 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
pip install -r requirements/ci.txt | ||
- name: Lint with Flake8 | ||
run: | | ||
flake8 src/ tests/ | ||
- name: Lint with PyLint | ||
run: | | ||
pylint src/ tests/ | ||
pytype: | ||
name: Typing | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- ubuntu-latest | ||
python-version: ["3.11"] | ||
steps: | ||
- name: Checkout source at ${{ matrix.platform }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
pip install -r requirements/ci.txt | ||
- name: Static type check with Pytype | ||
run: | | ||
pytype | ||
typing: | ||
name: Typing | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- ubuntu-latest | ||
python-version: ["3.12"] | ||
steps: | ||
- name: Checkout source at ${{ matrix.platform }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
pip install -r requirements/ci.txt | ||
- name: Static type check with MyPy | ||
run: | | ||
mypy --install-types --non-interactive src/ | ||
security: | ||
name: Security | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- ubuntu-latest | ||
python-version: ["3.12"] | ||
steps: | ||
- name: Checkout source at ${{ matrix.platform }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
pip install -r requirements/ci.txt | ||
- name: Check security issue in code with Bandit | ||
python -m pip install --upgrade pip tox | ||
- name: Run tox | ||
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }} | ||
run: | | ||
bandit -r src/ | ||
- name: Check dependencies for known security vulnerabilities with Safety | ||
tox -e py,py-async,style,typing,security,docs | ||
- name: Run tox (Pytype) | ||
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }} | ||
run: | | ||
safety check | ||
tox -e pytype | ||
test: | ||
name: Test | ||
needs: [lint, typing, security] | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -159,7 +68,7 @@ jobs: | |
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
pip install -r requirements/test.txt | ||
pip install -r requirements/tests.txt | ||
- name: Test and and run coverage with PyTest | ||
run: | | ||
py.test | ||
|
@@ -170,6 +79,7 @@ jobs: | |
name: test-n-coverage-report | ||
path: | | ||
.coverage | ||
coverage.lcov | ||
junit/ | ||
htmlcov/ | ||
|
@@ -184,34 +94,21 @@ jobs: | |
- ubuntu-latest | ||
python-version: ["3.12"] | ||
steps: | ||
- name: Checkout source at ${{ matrix.platform }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements/test.txt | ||
- name: Download a coverage artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: test-n-coverage-report | ||
- name: Send coverage stats to Coveralls | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: | | ||
coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
format: lcov | ||
file: coverage.lcov | ||
allow-empty: true | ||
|
||
build: | ||
name: Build source | ||
needs: coverage | ||
needs: [run-tox, coverage] | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -232,19 +129,16 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Build source and wheel distributions | ||
run: | | ||
python -m pip install --upgrade pip setuptools build | ||
python -m pip install build | ||
python -m build --outdir dist-${{ matrix.platform }}-${{ matrix.python-version }} | ||
- name: Tar build and wheel distributions files | ||
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }} | ||
run: | | ||
mv dist-${{ matrix.platform }}-${{ matrix.python-version }} dist | ||
tar -cvf dist.tar dist | ||
tar -cvf dist-${{ matrix.platform }}-${{ matrix.python-version }}.tar dist-${{ matrix.platform }}-${{ matrix.python-version }} | ||
- name: Upload build and wheel distributions files | ||
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pre-release-build | ||
path: dist.tar | ||
name: pre-release-build-${{ matrix.platform }}-${{ matrix.python-version }} | ||
path: dist-${{ matrix.platform }}-${{ matrix.python-version }}.tar | ||
|
||
publish-testpypi: | ||
name: Publish to TestPyPI | ||
|
@@ -270,30 +164,17 @@ jobs: | |
- name: Download build and wheel distributions files | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: pre-release-build | ||
name: pre-release-build-${{ matrix.platform }}-${{ matrix.python-version }} | ||
- name: Build source and wheel distributions to version ${{ github.ref_name }} | ||
run: | | ||
python -m pip install --upgrade pip setuptools twine | ||
tar -xvf dist.tar | ||
twine check --strict dist/* | ||
python -m pip install twine | ||
tar -xvf dist-${{ matrix.platform }}-${{ matrix.python-version }}.tar | ||
twine check --strict dist-${{ matrix.platform }}-${{ matrix.python-version }}/* | ||
- name: Publish distribution to TestPyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: true | ||
# - name: Create GitHub Pre Release | ||
# id: create_release | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# name: ${{ github.ref_name }} | ||
# draft: false | ||
# prerelease: true | ||
# generate_release_notes: true | ||
# files: | | ||
# COPYING | ||
# LICENSE | ||
# AUTHORS | ||
# README.md | ||
# dist/* | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: dist-${{ matrix.platform }}-${{ matrix.python-version }}/ | ||
skip-existing: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,7 @@ htmlcov/ | |
.nox/ | ||
.coverage | ||
.coverage.* | ||
coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
Oops, something went wrong.