diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..86d3cc4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + cache: "npm" + + - name: Install root dependencies + run: npm ci + + - name: Check formatting + run: npm run format:check + + - name: Install common dependencies + working-directory: ./common + run: npm ci + + - name: Type check common + working-directory: ./common + run: npx tsc --noEmit + + - name: Build common + working-directory: ./common + run: npm run build + + - name: Install mcp-server dependencies + working-directory: ./mcp-server + run: npm ci + + - name: Type check mcp-server + working-directory: ./mcp-server + run: npx tsc --noEmit + + - name: Build mcp-server + working-directory: ./mcp-server + run: npm run build + + - name: Install penpot-plugin dependencies + working-directory: ./penpot-plugin + run: npm ci + + - name: Type check penpot-plugin + working-directory: ./penpot-plugin + run: npx tsc --noEmit + + - name: Build penpot-plugin + working-directory: ./penpot-plugin + run: npm run build diff --git a/package.json b/package.json index 674f532..a092ac2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build:all": "concurrently --names \"COMMON,MCP-SERVER,PLUGIN\" --prefix-colors \"green,cyan,magenta\" --success first \"npm --prefix common install && npm --prefix common run build\" \"npm --prefix mcp-server run build\" \"npm --prefix penpot-plugin run build\"", "start:all": "concurrently --names \"MCP-SERVER,PLUGIN-SERVER\" --prefix-colors \"cyan,magenta\" --kill-others-on-fail \"npm --prefix mcp-server start\" \"npm --prefix penpot-plugin run dev\"", "bootstrap": "npm run install:all && npm run build:all && npm run start:all", - "format": "prettier --write ." + "format": "prettier --write .", + "format:check": "prettier --check ." }, "repository": { "type": "git",