From 87e72f339ba23bd882671af12de3c21202fd407a Mon Sep 17 00:00:00 2001 From: AliiiBenn Date: Tue, 10 Mar 2026 14:13:11 +0100 Subject: [PATCH] feat: enhance CI/CD with additional tooling - Add explicit mypy configuration to pyproject.toml - Add web.yml workflow for Next.js lint, types, and build - Add .pre-commit-config.yaml with ruff and mypy hooks - Add npm to Dependabot for web app dependencies Co-Authored-By: Claude Opus 4.5 --- .github/dependabot.yml | 18 +++++++- .github/workflows/web.yml | 74 +++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 13 ++++++ packages/typemap/pyproject.toml | 13 ++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/web.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 78d5d00..8c456c9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,7 @@ version: 2 updates: - # Enable version updates for npm + # Enable version updates for Python - package-ecosystem: "pip" directory: "/packages/typemap" schedule: @@ -20,6 +20,22 @@ updates: prefix: "chore" include: "scope" + # Enable version updates for npm + - package-ecosystem: "npm" + directory: "/apps/web" + schedule: + interval: "weekly" + day: "monday" + time: "09:00" + timezone: "UTC" + open-pull-requests-limit: 10 + labels: + - "dependencies" + - "security" + commit-message: + prefix: "chore" + include: "scope" + # Enable version updates for GitHub Actions - package-ecosystem: "github-actions" directory: "/" diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml new file mode 100644 index 0000000..52aa014 --- /dev/null +++ b/.github/workflows/web.yml @@ -0,0 +1,74 @@ +name: Web + +on: + push: + branches: [main] + paths: + - 'apps/web/**' + - '.github/workflows/web.yml' + pull_request: + paths: + - 'apps/web/**' + - '.github/workflows/web.yml' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: apps/web/package-lock.json + + - name: Install dependencies + run: npm ci + working-directory: apps/web + + - name: Run lint + run: npm run lint + working-directory: apps/web + + types: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: apps/web/package-lock.json + + - name: Install dependencies + run: npm ci + working-directory: apps/web + + - name: Type check + run: npm run types:check + working-directory: apps/web + + build: + runs-on: ubuntu-latest + needs: [lint, types] + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: apps/web/package-lock.json + + - name: Install dependencies + run: npm ci + working-directory: apps/web + + - name: Build + run: npm run build + working-directory: apps/web diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b88f22f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.4 + hooks: + - id: ruff + - id: ruff-format + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.14.0 + hooks: + - id: mypy + additional_dependencies: + - typing_extensions>=4.0 + exclude: "^tests/" diff --git a/packages/typemap/pyproject.toml b/packages/typemap/pyproject.toml index 4d9217e..5d02ba6 100644 --- a/packages/typemap/pyproject.toml +++ b/packages/typemap/pyproject.toml @@ -81,3 +81,16 @@ exclude_lines = [ ] precision = 2 show_missing = true + +[tool.mypy] +python_version = "3.14" +warn_return_any = true +warn_unused_configs = true +disallow_untyped_defs = false +warn_unused_ignores = true +strict_optional = true +no_implicit_optional = true + +[[tool.mypy.overrides]] +module = "tests.*" +ignore_errors = true