Kaynağa Gözat

ci: add GitHub Actions workflow for build and test

Matrix: Node.js 20 + 22, runs on push/PR to main/master
majx_mac 8 ay önce
ebeveyn
işleme
e85094aa33
1 değiştirilmiş dosya ile 30 ekleme ve 0 silme
  1. 30 0
      .github/workflows/ci.yml

+ 30 - 0
.github/workflows/ci.yml

@@ -0,0 +1,30 @@
+name: CI
+
+on:
+  push:
+    branches: [master, main]
+  pull_request:
+    branches: [master, main]
+
+jobs:
+  build-and-test:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        node-version: [20, 22]
+
+    steps:
+      - uses: actions/checkout@v4
+
+      - uses: pnpm/action-setup@v4
+        with:
+          version: 9
+
+      - uses: actions/setup-node@v4
+        with:
+          node-version: ${{ matrix.node-version }}
+          cache: pnpm
+
+      - run: pnpm install --frozen-lockfile
+      - run: pnpm build
+      - run: pnpm test