Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
37137f6
feat: add mongodb-memory-server for cross-platform testing
fabiovincenzi Jan 21, 2026
b362e46
ci: add Windows to test matrix and use mongodb-memory-server
fabiovincenzi Jan 21, 2026
d784b2b
fix: replace bash script with Node.js for cross-platform build
fabiovincenzi Jan 21, 2026
0c602de
fix: add cross-env for Windows-compatible test scripts
fabiovincenzi Jan 21, 2026
edc03b5
fix: make tests cross-platform compatible for Windows
fabiovincenzi Jan 21, 2026
d57d31d
fix: improve Windows compatibility for tests
fabiovincenzi Jan 21, 2026
c4aa15e
fix: enable Windows Developer Mode for npm symlinks in CI
fabiovincenzi Jan 21, 2026
d770edd
test: debug errors
fabiovincenzi Jan 21, 2026
7eed120
test: debug errors
fabiovincenzi Jan 21, 2026
e746e75
fix: use file:// URLs for Windows ESM loader compatibility in plugin …
fabiovincenzi Jan 21, 2026
05bd573
test: skip cypress tests for windows
fabiovincenzi Jan 21, 2026
30122d4
fix: increase test timeout for windows
fabiovincenzi Jan 21, 2026
d20413b
fix: remove unnecessary MongoDB dependency from tests
fabiovincenzi Jan 23, 2026
4343773
fix: ignore cross-env unused dependency
fabiovincenzi Jan 23, 2026
5193d1e
Merge branch 'main' into windows-failing-tests
fabiovincenzi Jan 26, 2026
7262514
Merge branch 'main' into windows-failing-tests
fabiovincenzi Jan 28, 2026
636e22f
Merge branch 'main' into windows-failing-tests
fabiovincenzi Feb 3, 2026
7450215
chore: address PR review feedback
fabiovincenzi Feb 3, 2026
77ba9b3
chore: merge remote windows-failing-tests
fabiovincenzi Feb 3, 2026
ae07d48
ci: restructure CI with MongoDB matrix for Ubuntu and single Windows …
fabiovincenzi Feb 3, 2026
5fe3163
Merge branch 'main' into windows-failing-tests
fabiovincenzi Feb 3, 2026
65c45bd
Merge branch 'main' into windows-failing-tests
fabiovincenzi Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 60 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ permissions:
pull-requests: write

jobs:
build:
# Ubuntu build with MongoDB matrix (9 combinations: 3 Node × 3 MongoDB)
build-ubuntu:
runs-on: ubuntu-latest

strategy:
Expand All @@ -38,7 +39,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Start MongoDB
Comment thread
jescalada marked this conversation as resolved.
uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # ratchet:supercharge/mongodb-github-action@1.12.1
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
with:
mongodb-version: ${{ matrix.mongodb-version }}

Expand All @@ -65,24 +66,21 @@ jobs:
with:
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Exit if coverage condition not met
# if: ${{ steps.test.outputs.exit_code }} != 0
# run: exit ${{ steps.test.outputs.exit_code }}

- name: Build frontend
run: npm run build-ui

- name: Save build folder
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: build-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
name: build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
if-no-files-found: error
path: build

- name: Download the build folders
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # ratchet:actions/download-artifact@v5
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: build-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
name: build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
path: build

- name: Run cypress test
Expand All @@ -93,37 +91,80 @@ jobs:
wait-on-timeout: 120
command: npm run cypress:run

# Windows build - single combination for development support
build-windows:
runs-on: windows-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Use Node.js 24.x
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24.x

- name: Enable Windows Developer Mode
shell: powershell
run: |
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

- name: Install dependencies
run: npm ci

- name: Check Types (Server)
run: npm run check-types:server

- name: Build TypeScript
run: npm run build-ts

- name: Test
id: test
shell: bash
run: |
npm run test-coverage-ci
npm run test-coverage-ci --workspaces --if-present

- name: Build frontend
run: npm run build-ui

# Execute a final job to collect the results and report a single check status
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: build result
needs: [build]
needs: [build-ubuntu, build-windows]
steps:
- name: Check build results
run: |
result="${{ needs.build.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
ubuntu_result="${{ needs.build-ubuntu.result }}"
windows_result="${{ needs.build-windows.result }}"
if [[ ($ubuntu_result == "success" || $ubuntu_result == "skipped") && ($windows_result == "success" || $windows_result == "skipped") ]]; then
echo "### ✅ All builds passed" >> $GITHUB_STEP_SUMMARY
exit 0
else
echo "### ❌ Some builds failed" >> $GITHUB_STEP_SUMMARY
echo "- Ubuntu: $ubuntu_result" >> $GITHUB_STEP_SUMMARY
echo "- Windows: $windows_result" >> $GITHUB_STEP_SUMMARY
exit 1
fi

- name: Parse failed matrix jobs
if: needs.build.result == 'failure'
if: needs.build-ubuntu.result == 'failure' || needs.build-windows.result == 'failure'
run: |
echo "## Failed Matrix Combinations" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Node Version | MongoDB Version | Status |" >> $GITHUB_STEP_SUMMARY
echo "|--------------|-----------------|--------|" >> $GITHUB_STEP_SUMMARY

# Parse the matrix results from the build job
results='${{ toJSON(needs.build.outputs) }}'
echo "| OS | Node Version | MongoDB Version | Status |" >> $GITHUB_STEP_SUMMARY
echo "|----|--------------|-----------------|--------|" >> $GITHUB_STEP_SUMMARY

# Since we can't directly get individual matrix job statuses,
# we'll note that the build job failed
echo "| Multiple | Multiple | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
echo "| Multiple | Multiple | Multiple | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "⚠️ Check the [build job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details on which specific matrix combinations failed." >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/unused-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
node-version: '22.x'
- name: 'Run depcheck'
run: |
npx depcheck --skip-missing --ignores="tsx,@babel/*,@commitlint/*,eslint,eslint-*,husky,ts-node,concurrently,nyc,prettier,typescript,tsconfig-paths,vite-tsconfig-paths,quicktype,history,@types/domutils,@vitest/coverage-v8"
npx depcheck --skip-missing --ignores="tsx,@babel/*,@commitlint/*,eslint,eslint-*,husky,ts-node,concurrently,nyc,prettier,typescript,tsconfig-paths,vite-tsconfig-paths,quicktype,history,@types/domutils,@vitest/coverage-v8,cross-env"
echo $?
if [[ $? == 1 ]]; then
echo "Unused dependencies or devDependencies found"
Expand Down
65 changes: 42 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
"server": "ALLOWED_ORIGINS=* tsx index.ts",
"start": "concurrently \"npm run server\" \"npm run client\"",
"build": "npm run generate-config-types && npm run build-ui && npm run build-ts",
"build-ts": "tsc --project tsconfig.publish.json && ./scripts/fix-shebang.sh",
"build-ts": "tsc --project tsconfig.publish.json && node scripts/fix-shebang.js",
"build-ui": "vite build",
"check-types": "tsc",
"check-types:server": "tsc --project tsconfig.publish.json --noEmit",
"test": "NODE_ENV=test vitest --run --dir ./test",
"test": "cross-env NODE_ENV=test vitest --run --dir ./test",
"test:e2e": "vitest run --config vitest.config.e2e.ts",
"test:e2e:watch": "vitest --config vitest.config.e2e.ts",
"test-coverage": "NODE_ENV=test vitest --run --dir ./test --coverage",
"test-coverage-ci": "NODE_ENV=test vitest --run --dir ./test --coverage.enabled=true --coverage.reporter=lcovonly --coverage.reporter=text",
"test-watch": "NODE_ENV=test vitest --dir ./test --watch",
"test-coverage": "cross-env NODE_ENV=test vitest --run --dir ./test --coverage",
"test-coverage-ci": "cross-env NODE_ENV=test vitest --run --dir ./test --coverage.enabled=true --coverage.reporter=lcovonly --coverage.reporter=text",
"test-watch": "cross-env NODE_ENV=test vitest --dir ./test --watch",
"prepare": "node ./scripts/prepare.js",
"lint": "eslint",
"lint:fix": "eslint --fix",
Expand Down Expand Up @@ -152,6 +152,7 @@
"@types/yargs": "^17.0.35",
"@vitejs/plugin-react": "^5.1.2",
"@vitest/coverage-v8": "^3.2.4",
"cross-env": "^10.1.0",
"cypress": "^15.9.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
Expand Down
16 changes: 16 additions & 0 deletions scripts/fix-shebang.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node

const fs = require('fs');
const path = require('path');

const distIndexPath = path.join(__dirname, '..', 'dist', 'index.js');

if (fs.existsSync(distIndexPath)) {
let content = fs.readFileSync(distIndexPath, 'utf-8');
// Replace tsx with node in the shebang (first line)
content = content.replace(/^#!.*tsx/, '#!/usr/bin/env node');
fs.writeFileSync(distIndexPath, content);
console.log('Fixed shebang in dist/index.js');
} else {
console.log('dist/index.js not found, skipping shebang fix');
}
8 changes: 0 additions & 8 deletions scripts/fix-shebang.sh

This file was deleted.

7 changes: 7 additions & 0 deletions src/proxy/processors/push-action/preReceive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ const exec = async (
const step = new Step('executeExternalPreReceiveHook');
let stderrTrimmed = '';

// Pre-receive hooks execute Unix shell scripts, which is not supported on Windows
if (process.platform === 'win32') {
step.log('Warning: Pre-receive hooks are not supported on Windows, skipping execution.');
action.addStep(step);
return action;
}

try {
const resolvedPath = path.resolve(hookFilePath);
const hookDir = path.dirname(resolvedPath);
Expand Down
Loading
Loading