From 0aa3f0dfbc2549e0c507a5e2e3f71a94aab145f8 Mon Sep 17 00:00:00 2001 From: Lellansin Date: Sat, 16 May 2026 09:52:39 +0800 Subject: [PATCH 1/2] feat: add GitHub CI workflow with multi-version Node.js and cross-platform matrix --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..11cf1a3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + build-and-test: + name: Node ${{ matrix.node-version }} / ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-latest + node-version: + - "18" + - "20" + - "22" + - "24" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - name: Install dependencies + run: npm ci + + - name: TypeCheck + Lint + Format Check + run: npm run check + + - name: Bundle + run: npm run bundle + + - name: Test + run: npm test From 9fc53984975c15b726d56fe4e45b40cdb3170aac Mon Sep 17 00:00:00 2001 From: Lellansin Date: Sat, 16 May 2026 09:55:37 +0800 Subject: [PATCH 2/2] fix(ci): trigger CI on all push events so PRs can verify before merge --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11cf1a3..0b214bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,8 @@ name: CI on: - pull_request: - branches: [main] push: + pull_request: branches: [main] jobs: