Skip to content

Context7 Platform -- Up-to-date docs for AI agents

add simple ci

Dmytro Onypkoe0775b3fa2c0
diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml
new file mode 100644
index 00000000..fd83175d
--- /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 28fc3027..fbee769c 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": {