Pydantic V2 support #24
Workflow file for this run
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
name: Python Lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pip cache | |
uses: actions/cache@v3 | |
id: pipcache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-flake8 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e . | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
uses: liskin/gh-problem-matcher-wrap@v2 | |
with: | |
linters: flake8 | |
run: flake8 --extend-ignore=E203 datauri tests | |
checkmanifest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pip cache | |
uses: actions/cache@v3 | |
id: pipcache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-checkmanifest | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e . | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Check manifest | |
run: check-manifest | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pip cache | |
uses: actions/cache@v3 | |
id: pipcache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-isort | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e . | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Import order checking with isort | |
uses: liskin/gh-problem-matcher-wrap@v2 | |
with: | |
linters: isort | |
run: isort --check --diff . | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pip cache | |
uses: actions/cache@v3 | |
id: pipcache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-black | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e . | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- uses: psf/black@stable | |
with: | |
options: "--check" | |
src: "." | |
typing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pip cache | |
uses: actions/cache@v3 | |
id: pipcache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-typing | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e . | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Static type checking with mypy | |
uses: liskin/gh-problem-matcher-wrap@v2 | |
with: | |
linters: mypy | |
run: mypy --install-types --non-interactive --config mypy.ini datauri |