add simple ci

This commit is contained in:
Dmytro Onypko 2025-06-01 16:41:55 +01:00
parent fcd166d95f
commit e0775b3fa2
No known key found for this signature in database
GPG Key ID: AC03496CA69745FE
2 changed files with 49 additions and 0 deletions

48
.github/workflows/check.yaml vendored Normal file
View File

@ -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

View File

@ -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": {