From 914e9b9472a66f48f2cbd0ae973490d3d80c1032 Mon Sep 17 00:00:00 2001 From: Michael Sun Date: Tue, 28 Oct 2025 16:50:34 -0700 Subject: [PATCH] Add typecheck/linting to github cicd --- .../workflows/agentex-ui-lint-typecheck.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/agentex-ui-lint-typecheck.yml diff --git a/.github/workflows/agentex-ui-lint-typecheck.yml b/.github/workflows/agentex-ui-lint-typecheck.yml new file mode 100644 index 00000000..a5db0e44 --- /dev/null +++ b/.github/workflows/agentex-ui-lint-typecheck.yml @@ -0,0 +1,42 @@ +name: "Agentex UI - Lint & Typecheck" + +on: + pull_request: + branches: [ main ] + # Run lint and typecheck on any changes to agentex-ui code or workflow + paths: + - 'agentex-ui/**' + - '.github/workflows/agentex-ui-lint-typecheck.yml' + +jobs: + lint-and-typecheck: + name: "Lint and Typecheck" + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout + uses: actions/checkout@v4 + + # Set up Node.js + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: './agentex-ui/package-lock.json' + + # Install dependencies + - name: Install dependencies + run: npm ci + working-directory: ./agentex-ui + + # Run TypeScript type checking + - name: Run typecheck + run: npm run typecheck + working-directory: ./agentex-ui + + # Run ESLint + - name: Run lint + run: npm run lint + working-directory: ./agentex-ui