diff --git a/.github/workflows/devtools-python.yaml b/.github/workflows/devtools-python.yaml new file mode 100644 index 000000000..49ec4c0fe --- /dev/null +++ b/.github/workflows/devtools-python.yaml @@ -0,0 +1,26 @@ +name: Devtools Python Check + +on: + pull_request: + paths: + - 'tools/devtools/**' + push: + branches: [ main ] + paths: + - 'tools/devtools/**' + +jobs: + syntax: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Validate Python syntax + run: python3 -m compileall -q tools/devtools diff --git a/knip.config.ts b/knip.config.ts index 3022a0af5..9a8b09071 100644 --- a/knip.config.ts +++ b/knip.config.ts @@ -20,6 +20,7 @@ const config: KnipConfig = { project: ['src/**/*.{js,ts}', '*.{js,ts,mts}'] } }, + ignoreBinaries: ['python3'], ignoreDependencies: [ // Weird importmap things '@iconify/json', diff --git a/package.json b/package.json index da9b83ebe..7d6135f7b 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "collect-i18n": "pnpm exec playwright test --config=playwright.i18n.config.ts", "json-schema": "tsx scripts/generate-json-schema.ts", "storybook": "nx storybook -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "devtools:pycheck": "python3 -m compileall -q tools/devtools" }, "devDependencies": { "@eslint/js": "^9.35.0",