From 9735beddf2542bbeaa0dc72e7638d085998b6791 Mon Sep 17 00:00:00 2001 From: evanbacon Date: Tue, 8 Jul 2025 12:47:54 -0500 Subject: [PATCH 1/4] feat: add GitHub Actions CI/CD workflows - Add continuous testing workflow for Node.js 16, 18, and 20 - Add cross-platform testing for Ubuntu, Windows, and macOS - Run tests on push to main/master branches and on PRs - Include build verification in CI pipeline --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++ .github/workflows/cross-platform.yml | 35 ++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/cross-platform.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aae4926 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.x, 20.x] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Run tests + run: yarn test + + - name: Build project + run: yarn build + + lint-and-format: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js 18.x + uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Check TypeScript types + run: yarn build diff --git a/.github/workflows/cross-platform.yml b/.github/workflows/cross-platform.yml new file mode 100644 index 0000000..c20b1ac --- /dev/null +++ b/.github/workflows/cross-platform.yml @@ -0,0 +1,35 @@ +name: Cross-Platform Tests + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test-cross-platform: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [18.x] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Run tests + run: yarn test + + - name: Build project + run: yarn build From 4caa64e348e8995185afce4951564276f90103a0 Mon Sep 17 00:00:00 2001 From: evanbacon Date: Tue, 8 Jul 2025 13:22:43 -0500 Subject: [PATCH 2/4] simplify CI: use Node.js LTS and test only on Linux + Windows - Simplified CI to use latest Node.js LTS instead of multiple versions - Consolidated to single workflow testing on Ubuntu and Windows only - Removed separate cross-platform workflow file - Updated to trigger only on main branch - Faster CI execution with fewer matrix combinations --- .github/workflows/ci.yml | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aae4926..7954716 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,26 +2,26 @@ name: CI on: push: - branches: [ main, master ] + branches: [ main ] pull_request: - branches: [ main, master ] + branches: [ main ] jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest] steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js LTS uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 'lts/*' cache: 'yarn' - name: Install dependencies @@ -32,22 +32,3 @@ jobs: - name: Build project run: yarn build - - lint-and-format: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Use Node.js 18.x - uses: actions/setup-node@v4 - with: - node-version: 18.x - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Check TypeScript types - run: yarn build From 516592dc40b30916ae8b84748e20b66450ac118f Mon Sep 17 00:00:00 2001 From: evanbacon Date: Tue, 8 Jul 2025 13:23:35 -0500 Subject: [PATCH 3/4] Delete cross-platform.yml --- .github/workflows/cross-platform.yml | 35 ---------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .github/workflows/cross-platform.yml diff --git a/.github/workflows/cross-platform.yml b/.github/workflows/cross-platform.yml deleted file mode 100644 index c20b1ac..0000000 --- a/.github/workflows/cross-platform.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Cross-Platform Tests - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - test-cross-platform: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [18.x] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Run tests - run: yarn test - - - name: Build project - run: yarn build From 2348ba887607b8686b069731feedcc3bd60565e0 Mon Sep 17 00:00:00 2001 From: evanbacon Date: Tue, 8 Jul 2025 13:25:58 -0500 Subject: [PATCH 4/4] fix CI: run tests only on macOS due to plutil dependency - Changed CI to run on macos-latest instead of Linux/Windows - Tests require plutil command which is macOS-specific - Removed matrix strategy since only one OS is needed - Fixes 'spawn plutil ENOENT' error on non-macOS runners --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7954716..241d779 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,7 @@ on: jobs: test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest] + runs-on: macos-latest steps: - name: Checkout code