From e0775b3fa2c04ea2c792ad03aaea11a9919f5a61 Mon Sep 17 00:00:00 2001 From: Dmytro Onypko Date: Sun, 1 Jun 2025 16:41:55 +0100 Subject: [PATCH] add simple ci --- .github/workflows/check.yaml | 48 ++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..fd83175 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,48 @@ +name: Build Check + +on: + push: + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} + restore-keys: | + ${{ runner.os }}-bun- + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Run linter + run: bun run lint:check + + - name: Check formatting + run: bun run format --check + + - name: Build project + run: bun run build diff --git a/package.json b/package.json index 28fc302..fbee769 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "tsc && chmod 755 dist/index.js", "format": "prettier --write .", "lint": "eslint \"**/*.{js,ts,tsx}\" --fix", + "lint:check": "eslint \"**/*.{js,ts,tsx}\"", "start": "MCP_TRANSPORT=http node dist/index.js" }, "repository": {