diff --git a/.github/actions/changes/action.yaml b/.github/actions/changes/action.yaml index 16e1d632db..b2e637234f 100644 --- a/.github/actions/changes/action.yaml +++ b/.github/actions/changes/action.yaml @@ -39,6 +39,7 @@ runs: filters: | openapi: - 'openapi/**' + - 'plugins/*/openapi/**' tests: - 'tests/**' - 'pytest.ini' diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 67691a7f3c..fce256ed7b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -504,6 +504,34 @@ jobs: - name: Lint run: pnpm lint + web-sdk-gen: + name: Web SDK generation check + needs: [changes] + if: > + !cancelled() && ( + github.event_name == 'workflow_dispatch' || + needs.changes.outputs.openapi == 'true' || + needs.changes.outputs.web-studio == 'true' + ) + runs-on: ubuntu-latest + defaults: + run: + working-directory: web + shell: bash + steps: + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: "22" + - name: Install pnpm via corepack + run: npm i -g corepack@0.31.0 && corepack enable pnpm + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Generate SDK from OpenAPI specs + run: pnpm --filter @nemo/sdk gen:all-force + - name: Typecheck SDK generated output + run: pnpm --filter @nemo/sdk typecheck + web-studio-deps: name: Web studio deps check needs: [changes] @@ -740,6 +768,7 @@ jobs: - web-test - web-format - web-lint + - web-sdk-gen - web-studio-deps - web-studio-e2e - benchmark-guardrails diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd56484d71..8cfd4a0a7c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,7 +55,7 @@ repos: hooks: - id: config-reference-docs name: Check config reference doc is up to date - entry: bash -c 'uv run generate-config-docs && git diff --exit-code docs/set-up/config-reference.md' + entry: bash -c 'uv run generate-config-docs && git diff --exit-code docs/set-up/config-reference.mdx' language: system pass_filenames: false files: | @@ -63,7 +63,7 @@ repos: script/generate_config_docs\.py| packages/nmp_common/.*| services/.*/src/.*/config\.py| - docs/set-up/config-reference\.md + docs/set-up/config-reference\.mdx )$ - repo: https://github.com/norwoodj/helm-docs