|
1 | | -name: CI/CD Tests |
| 1 | +name: CI - Bun |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | test: |
11 | | - name: E2E Tests |
| 11 | + name: Tests (Bun) |
12 | 12 | runs-on: ubuntu-latest |
13 | | - |
14 | | - strategy: |
15 | | - matrix: |
16 | | - node-version: [18.x, 20.x, 22.x] |
17 | | - |
18 | 13 | steps: |
19 | 14 | - name: Checkout repository |
20 | 15 | uses: actions/checkout@v4 |
21 | | - |
22 | | - - name: Setup Node.js ${{ matrix.node-version }} |
23 | | - uses: actions/setup-node@v4 |
| 16 | + |
| 17 | + - name: Setup Bun |
| 18 | + uses: oven-sh/setup-bun@v2 |
24 | 19 | with: |
25 | | - node-version: ${{ matrix.node-version }} |
26 | | - cache: 'npm' |
27 | | - |
| 20 | + bun-version: latest |
| 21 | + |
28 | 22 | - name: Install dependencies |
29 | | - run: npm ci |
30 | | - |
| 23 | + run: bun install --frozen-lockfile |
| 24 | + |
31 | 25 | - name: Type check |
32 | | - run: npm run type-check |
33 | | - |
34 | | - - name: Build project |
35 | | - run: npm run build |
36 | | - |
37 | | - - name: Run E2E tests |
38 | | - run: npm run test:quick |
39 | | - |
40 | | - - name: Test configuration loading |
41 | | - run: | |
42 | | - echo "Testing basic configuration..." |
43 | | - timeout 10s node build/index.js --config=tests/configs/basic.yaml || true |
44 | | - echo "Testing JSON configuration..." |
45 | | - timeout 10s node build/index.js --config=tests/configs/basic.json || true |
46 | | - |
47 | | - - name: Test environment configuration |
48 | | - run: | |
49 | | - echo "Testing environment variables..." |
50 | | - timeout 10s env MCP_SERVERS="test:npx:user-review-mcp" node build/index.js || true |
| 26 | + run: bun x tsc --noEmit |
51 | 27 |
|
52 | | - build-check: |
53 | | - name: Build Verification |
54 | | - runs-on: ubuntu-latest |
55 | | - |
56 | | - steps: |
57 | | - - name: Checkout repository |
58 | | - uses: actions/checkout@v4 |
59 | | - |
60 | | - - name: Setup Node.js |
61 | | - uses: actions/setup-node@v4 |
62 | | - with: |
63 | | - node-version: '20.x' |
64 | | - cache: 'npm' |
65 | | - |
66 | | - - name: Install dependencies |
67 | | - run: npm ci |
68 | | - |
69 | | - - name: Build project |
70 | | - run: npm run build |
71 | | - |
72 | | - - name: Verify build artifacts |
| 28 | + - name: Run quick E2E tests |
| 29 | + run: bun run tests/e2e-simple.ts |
| 30 | + |
| 31 | + - name: Run full E2E tests |
| 32 | + run: bun run tests/e2e-test.ts |
| 33 | + |
| 34 | + - name: Smoke: config loading with Bun |
73 | 35 | run: | |
74 | | - ls -la build/ |
75 | | - [ -f "build/index.js" ] || { echo "Missing index.js"; exit 1; } |
76 | | - [ -f "build/aggregator-server.js" ] || { echo "Missing aggregator-server.js"; exit 1; } |
77 | | - [ -f "build/config.js" ] || { echo "Missing config.js"; exit 1; } |
78 | | - echo "All build artifacts present ✅" |
79 | | - |
80 | | - - name: Test package installation |
| 36 | + timeout 10s bun run src/index.ts --config=tests/configs/basic.yaml || true |
| 37 | + timeout 10s bun run src/index.ts --config=tests/configs/basic.json || true |
| 38 | +
|
| 39 | + - name: Smoke: env config with Bun |
81 | 40 | run: | |
82 | | - npm pack |
83 | | - npm install -g ./mcp-gateway-*.tgz |
84 | | - echo "Package installation successful ✅" |
| 41 | + timeout 10s env MCP_SERVERS="test:npx:user-review-mcp" bun run src/index.ts || true |
0 commit comments