diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9e1cc1a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + +jobs: + CI: + runs-on: blacksmith-2vcpu-ubuntu-2204 + + steps: + - uses: actions/checkout@v3 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - uses: useblacksmith/cache@v5 + name: Setup bun cache + with: + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-store-v1-${{ hashFiles('**/bun.lockb') }} + restore-keys: | + ${{ runner.os }}-bun-store-v1 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Run linter (Biome) + run: bun run lint + + - name: Run type check + run: bun run typecheck + + - name: Run tests + run: bun test diff --git a/package.json b/package.json index 0d76499..007caf3 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "numia-engage-sdk", "module": "src/index.ts", "type": "module", + "scripts": { + "lint": "biome lint .", + "typecheck": "tsc --noEmit" + }, "devDependencies": { "@biomejs/biome": "1.9.4", "@happy-dom/global-registrator": "^15.7.4",