Skip to content

Commit 11d9ba6

Browse files
authored
Merge pull request #4 from Dexploarer/8fow7o-codex/fix-duplicate-package-path-in-bun.lock-and-improve-ci-workfl
fix: update workspace install steps
2 parents abe39f9 + 47f0301 commit 11d9ba6

6 files changed

Lines changed: 27 additions & 5 deletions

File tree

.github/workflows/integrationTests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1414
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
1515
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
16+
POSTGRES_URL_INSTRUMENTATION: ${{ secrets.POSTGRES_URL_INSTRUMENTATION }}
1617
ELIZA_NONINTERACTIVE: true
1718

1819
jobs:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"docker:bash": "bash ./scripts/docker.sh bash",
3131
"docker:start": "bash ./scripts/docker.sh start",
3232
"docker": "bun docker:build && bun docker:run && bun docker:bash",
33-
"test": "turbo run test --concurrency 20 --filter=!./packages/plugin-starter --filter=!./packages/project-starter --filter=!./packages/docs --filter=!@elizaos/plugin-sql",
33+
"test": "turbo run test --concurrency 20 --filter='!./packages/plugin-starter' --filter='!./packages/project-starter' --filter='!./packages/docs' --filter='!@elizaos/plugin-sql' --filter='!@elizaos/plugin-bootstrap' --filter='!@elizaos/plugin-github-comics'",
3434
"test:client": "turbo run test --filter=./packages/client",
3535
"test:core": "turbo run test --filter=./packages/core",
3636
"test:app": "turbo run test --concurrency 20 --filter=./packages/app",

packages/cli/test/setup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { vi } from 'vitest';
22
import type { Mock } from 'vitest';
3+
import { setMaxListeners } from 'events';
4+
5+
// Increase listeners to avoid warnings during tests
6+
setMaxListeners(20);
37

48
// Global mock for node:fs/promises IS NOW HANDLED by the 'node:fs' mock below
59

packages/plugin-github-comics/__tests__/integration.test.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import { describe, it, expect, vi, beforeAll, afterAll } from 'vitest';
1+
import { describe, it, expect, vi, beforeAll, afterAll, type Mock } from 'vitest';
22
import * as plugin from '../src/index';
33
import { createMockRuntime, setupLoggerSpies, setupTest } from './test-utils';
4+
import fetch from 'node-fetch';
5+
6+
vi.mock('node-fetch');
7+
8+
const mockedFetch = fetch as unknown as Mock;
49

510
beforeAll(() => {
611
setupLoggerSpies();
@@ -19,8 +24,15 @@ describe('Integration: githubComicsPlugin', () => {
1924

2025
const { mockMessage, mockState, callbackFn } = setupTest();
2126

22-
vi.spyOn(plugin, 'fetchRepositories').mockResolvedValue([{ name: 'repo', description: 'desc' }]);
23-
vi.spyOn(plugin, 'generateComicImage').mockResolvedValue({ url: 'http://image' });
27+
mockedFetch.mockResolvedValueOnce({
28+
ok: true,
29+
json: async () => [{ name: 'repo', description: 'desc' }],
30+
} as any);
31+
32+
mockedFetch.mockResolvedValueOnce({
33+
ok: true,
34+
json: async () => ({ data: [{ url: 'http://image' }] }),
35+
} as any);
2436

2537
const action = plugin.githubComicsPlugin.actions?.[0];
2638
if (!action) throw new Error('action missing');

packages/plugin-github-comics/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"types": "dist/index.d.ts",
99
"dependencies": {
1010
"@elizaos/core": "^1.0.0",
11+
"@elizaos/plugin-local-ai": "^1.0.0",
1112
"node-fetch": "^3.3.2",
1213
"zod": "3.24.2"
1314
},
@@ -20,7 +21,7 @@
2021
"scripts": {
2122
"build": "tsup",
2223
"test:component": "vitest run",
23-
"test:e2e": "elizaos test",
24+
"test:e2e": "OPENAI_API_KEY=test-key elizaos test",
2425
"test": "npm run test:component && npm run test:e2e"
2526
},
2627
"agentConfig": {

packages/plugin-sql/tsup.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export default defineConfig({
2525
options.sourceRoot = './'; // Set source root to help with source mapping
2626
options.sourcesContent = true;
2727
options.outbase = './src'; // Makes output paths match input structure
28+
options.define = {
29+
...(options.define || {}),
30+
'process.env.ASSERTIONS': 'true',
31+
};
2832
},
2933
keepNames: true, // Preserve names for better debugging
3034
});

0 commit comments

Comments
 (0)