Pytv1 migration of github workflow #2
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: lint | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [develop, release-**] | |
defaults: | |
run: | |
working-directory: ./python/pytv1 | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: pip install --upgrade pip black | |
- name: Run black | |
run: black --check --diff --verbose . | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: pip install --upgrade pip isort[colors] | |
- name: Run isort | |
run: isort --check-only --diff --verbose . | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: pip install --upgrade pip flake8 | |
- name: Run flake8 | |
run: flake8 --verbose . | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: pip install --upgrade pip mypy==1.0.1 pydantic==1.10.4 | |
- name: Run mypy | |
run: mypy --install-types --non-interactive ./src |