mirror of
https://github.com/upstash/context7.git
synced 2025-12-04 11:00:40 +00:00
add simple ci
This commit is contained in:
parent
fcd166d95f
commit
e0775b3fa2
48
.github/workflows/check.yaml
vendored
Normal file
48
.github/workflows/check.yaml
vendored
Normal 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
|
||||
@ -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": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user