Skip to content

feat: add basic enhancer #39

feat: add basic enhancer

feat: add basic enhancer #39

Workflow file for this run

---
name: validate
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_INDEX_URL: https://mirrors.ustc.edu.cn/pypi/simple
PIP_PROGRESS_BAR: off
PIP_ROOT_USER_ACTION: ignore
jobs:
lint-yaml:
name: lint workflow yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run yamllint
uses: karancode/yamllint-github-action@master
with:
yamllint_file_or_dir: .github/workflows
validate-and-lint:
name: Validate and Run Linters
runs-on: ubuntu-latest
needs: [lint-yaml]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: set up uv
uses: astral-sh/setup-uv@v4
- name: create virtual enviroment
run: uv venv
- name: Install dependencies
run: uv sync --group dev --group lint --group security --group typing
- name: Run Bandit
run: uv run bandit -c pyproject.toml -r .
- name: Run mypy
run: uv run mypy .
- name: Run ruff
run: uv run ruff check .
- name: Run detect-secrets
run: |
FILES_TO_SCAN=$(git ls-files -z | xargs -0)
uv run detect-secrets-hook \
--baseline .secrets.baseline \
"${FILES_TO_SCAN}"