diff --git a/.github/workflows/pr-bandit.yml b/.github/workflows/pr-bandit.yml index 6ba4c0d5..c90514e8 100644 --- a/.github/workflows/pr-bandit.yml +++ b/.github/workflows/pr-bandit.yml @@ -16,6 +16,7 @@ jobs: - { python-version: 3.7, tox-env: security} - { python-version: 3.8, tox-env: security} - { python-version: 3.9, tox-env: security} + - { python-version: "3.10", tox-env: security} steps: - name: Checkout the repository uses: actions/checkout@v2 diff --git a/.github/workflows/pr-python310.yml b/.github/workflows/pr-python310.yml new file mode 100644 index 00000000..713f6495 --- /dev/null +++ b/.github/workflows/pr-python310.yml @@ -0,0 +1,50 @@ +name: Python 3.10 Tests +on: + pull_request: + branches: + - main + push: + branches: + - main + paths: + - sanic/* + - tests/* + +jobs: + testPy39: + name: ut-${{ matrix.config.tox-env }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] + config: + - { + python-version: "3.10", + tox-env: py310, + ignore-error-flake: "false", + command-timeout: "0", + } + - { + python-version: "3.10", + tox-env: py310-no-ext, + ignore-error-flake: "true", + command-timeout: "600000", + } + steps: + - name: Checkout the Repository + uses: actions/checkout@v2 + id: checkout-branch + + - name: Run Unit Tests + uses: harshanarayana/custom-actions@main + with: + python-version: ${{ matrix.config.python-version }} + test-infra-tool: tox + test-infra-version: latest + action: tests + test-additional-args: "-e=${{ matrix.config.tox-env }},-vv=''" + experimental-ignore-error: "${{ matrix.config.ignore-error-flake }}" + command-timeout: "${{ matrix.config.command-timeout }}" + test-failure-retry: "3" diff --git a/.github/workflows/pr-type-check.yml b/.github/workflows/pr-type-check.yml index c5d12a74..80d8d9fa 100644 --- a/.github/workflows/pr-type-check.yml +++ b/.github/workflows/pr-type-check.yml @@ -16,6 +16,7 @@ jobs: - { python-version: 3.7, tox-env: type-checking} - { python-version: 3.8, tox-env: type-checking} - { python-version: 3.9, tox-env: type-checking} + - { python-version: "3.10", tox-env: type-checking} steps: - name: Checkout the repository uses: actions/checkout@v2 diff --git a/.github/workflows/pr-windows.yml b/.github/workflows/pr-windows.yml index e3a32e5d..73e29d4f 100644 --- a/.github/workflows/pr-windows.yml +++ b/.github/workflows/pr-windows.yml @@ -15,6 +15,7 @@ jobs: - { python-version: 3.7, tox-env: py37-no-ext } - { python-version: 3.8, tox-env: py38-no-ext } - { python-version: 3.9, tox-env: py39-no-ext } + - { python-version: "3.10", tox-env: py310-no-ext } - { python-version: pypy-3.7, tox-env: pypy37-no-ext } steps: diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml index 8c78f96c..621f34a0 100644 --- a/.github/workflows/publish-images.yml +++ b/.github/workflows/publish-images.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - name: Checkout repository diff --git a/setup.py b/setup.py index 2d7b9f0e..6b3552bb 100644 --- a/setup.py +++ b/setup.py @@ -72,6 +72,7 @@ setup_kwargs = { "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], "entry_points": {"console_scripts": ["sanic = sanic.__main__:main"]}, } @@ -94,7 +95,7 @@ requirements = [ tests_require = [ "sanic-testing>=0.7.0", - "pytest==5.2.1", + "pytest==6.2.5", "coverage==5.3", "gunicorn==20.0.4", "pytest-cov", diff --git a/tox.ini b/tox.ini index 5612f6de..609ceb48 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,11 @@ [tox] -envlist = py37, py38, py39, pyNightly, pypy37, {py37,py38,py39,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking +envlist = py37, py38, py39, py310, pyNightly, pypy37, {py37,py38,py39,py310,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking [testenv] usedevelop = true setenv = - {py37,py38,py39,pyNightly}-no-ext: SANIC_NO_UJSON=1 - {py37,py38,py39,pyNightly}-no-ext: SANIC_NO_UVLOOP=1 + {py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UJSON=1 + {py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UVLOOP=1 extras = test commands = pytest {posargs:tests --cov sanic}