Skip to content

Code Format MichaelDeng03 #1312

Code Format MichaelDeng03

Code Format MichaelDeng03 #1312

name: Code Formatting
run-name: Code Format ${{ github.actor }}
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev --locked
- name: black
uses: psf/black@stable
with:
options: "--check --verbose --skip-string-normalization --line-length=120"
- name: isort
uses: isort/isort-action@v1
with:
configuration: "--check-only --diff --profile black"
- name: bandit
uses: mdegis/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: "concrete"
level: high
confidence: high
exit_zero: true # force success. comments on pr when issues exist
skips: B101,B601
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev --locked
- name: flake8
uses: py-actions/flake8@v2
with:
max-line-length: "120"
ignore: "W293"
exclude: ".venv/**,migrations"
mypy:
runs-on: ubuntu-latest
strategy:
matrix:
package:
[
"./src/concrete-core",
"./src/concrete-async",
"./src/concrete-db",
]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev --locked
- name: Run task
run: |
uv run python -m mypy ${{ matrix.package }}