Skip to content

Commit 2c621a6

Browse files
Add test on PR workflow
1 parent dc35d77 commit 2c621a6

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
concurrency:
8+
group: pr-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v5
23+
with:
24+
node-version: 'lts/*'
25+
cache: npm
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run unit tests
31+
run: npm test

src/server/__tests__/server-registration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Server registration', () => {
2121

2222
expect(McpServer).toHaveBeenCalledWith({
2323
name: 'decodo',
24-
version: '1.2.0',
24+
version: '1.2.1',
2525
});
2626
});
2727

src/server/sapi-base-server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
22
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3+
import pkg from '../../package.json';
34
import { ScraperApiClient } from '../clients/scraper-api-client';
45
import {
56
AmazonSearchTool,
@@ -47,7 +48,7 @@ export class ScraperAPIBaseServer {
4748
constructor({ auth, toolsets = [] }: { auth: string; toolsets: TOOLSET[] }) {
4849
this.server = new McpServer({
4950
name: 'decodo',
50-
version: '1.2.1',
51+
version: pkg.version,
5152
});
5253
this.sapiClient = new ScraperApiClient();
5354

0 commit comments

Comments
 (0)