Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #247 from snok/sondrelg/maintenance
Browse files Browse the repository at this point in the history
Bump patch version
  • Loading branch information
sondrelg authored Dec 18, 2021
2 parents 3d3b69b + fc16225 commit bdf3957
Show file tree
Hide file tree
Showing 8 changed files with 282 additions and 264 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,12 @@ jobs:
source .venv/bin/activate
pre-commit run --all-files
get-python-versions:
runs-on: ubuntu-latest
outputs:
python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }}
steps:
- uses: snok/latest-python-versions@v1
id: get-python-versions-action
with:
min-version: 3.6
include-prereleases: false

test:
needs: [get-python-versions]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }}
python-version: [ "3.6", "3.7", "3.8" , "3.9", "3.10" ]
django-version: [ "2.2", "3.0", "3.1", "3.2" ]
steps:
- uses: actions/checkout@v2
Expand All @@ -62,7 +50,7 @@ jobs:
id: poetry-cache
with:
path: ~/.local
key: key-0
key: key-1
- name: Install poetry
uses: snok/install-poetry@v1
with:
Expand All @@ -72,22 +60,24 @@ jobs:
id: cache-venv
with:
path: .venv
key: ${{ hashFiles('**/poetry.lock') }}-0
key: ${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-1
- run: |
pip install virtualenv
virtualenv .venv
source .venv/bin/activate
pip install pip setuptools wheel -U
poetry install --no-interaction --no-root
if: steps.cache-venv.outputs.cache-hit != 'true'
- run: |
- name: Install django version
run: |
source .venv/bin/activate
pip install "Django==${{ matrix.django-version }}"
- run: |
source .venv/bin/activate
pip install coverage[toml]
- name: Install DRF 3.11 on Django 2.2
if: matrix.django-version == '2.2'
run: pip install "djangorestframework==3.11.1"
- run: pip install coverage
if: matrix.python-version == '3.10'
- name: Run tests
run: |
source .venv/bin/activate
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 21.7b0
rev: 21.12b0
hooks:
- id: black
args: ['--quiet']
Expand Down Expand Up @@ -28,16 +28,16 @@ repos:
'flake8-pytest-style',
]
- repo: https://github.com/asottile/pyupgrade
rev: v2.24.0
rev: v2.29.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/pycqa/isort
rev: 5.9.3
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.910'
rev: 'v0.920'
hooks:
- id: mypy
additional_dependencies: [django, djangorestframework, inflection, openapi-spec-validator, prance, pyYAML, django-stubs, djangorestframework-stubs, drf_yasg, drf-spectacular, types-PyYAML]
Expand Down
3 changes: 1 addition & 2 deletions openapi_tester/schema_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from django.core.exceptions import ImproperlyConfigured
from rest_framework.response import Response

from openapi_tester import OpenAPISchemaError
from openapi_tester import type_declarations as td
from openapi_tester.constants import (
INIT_ERROR,
Expand All @@ -18,7 +17,7 @@
VALIDATE_ONE_OF_ERROR,
VALIDATE_WRITE_ONLY_RESPONSE_KEY_ERROR,
)
from openapi_tester.exceptions import DocumentationError, UndocumentedSchemaSectionError
from openapi_tester.exceptions import DocumentationError, OpenAPISchemaError, UndocumentedSchemaSectionError
from openapi_tester.loaders import DrfSpectacularSchemaLoader, DrfYasgSchemaLoader, StaticSchemaLoader
from openapi_tester.utils import lazy_combinations, normalize_schema_section
from openapi_tester.validators import (
Expand Down
Loading

0 comments on commit bdf3957

Please sign in to comment.