Skip to content

Commit 37a8fa9

Browse files
committed
ci: enhance smoke test workflow to support exact version installation
1 parent d80e5a9 commit 37a8fa9

2 files changed

Lines changed: 21 additions & 20 deletions

File tree

‎.github/workflows/_smoke_test_npm_package.yaml‎

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ name: Smoke test npm package
33
on:
44
workflow_call:
55
inputs:
6-
version:
7-
description: Exact version to install (e.g. "1.2.3"). If empty, resolves from npm_tag.
8-
required: false
9-
type: string
10-
default: ""
116
npm_tag:
12-
description: NPM dist-tag to install (e.g. "beta", "latest"). Used when version is empty.
7+
description: NPM dist-tag to install (e.g. "beta", "latest"). Ignored when version is set.
138
required: false
149
type: string
1510
default: latest
11+
version:
12+
description: Exact version to install (e.g. "1.2.3"). Takes precedence over npm_tag.
13+
required: false
14+
type: string
15+
default: ""
1616

1717
jobs:
1818
smoke_test:
@@ -33,21 +33,16 @@ jobs:
3333
command: |
3434
mkdir -p smoke-test && cd smoke-test
3535
npm init -y
36-
SPEC="${{ inputs.version && format('@apify/actors-mcp-server@{0}', inputs.version) || format('@apify/actors-mcp-server@{0}', inputs.npm_tag) }}"
37-
npm install "$SPEC" @apify/mcpc
38-
39-
- name: Verify imports
40-
working-directory: smoke-test
41-
run: |
42-
node --input-type=module -e "import { ActorsMcpServer } from '@apify/actors-mcp-server'; console.log('OK: library')"
43-
node --input-type=module -e "import { HelperTools } from '@apify/actors-mcp-server/internals'; console.log('OK: internals')"
36+
VERSION="${{ inputs.version || inputs.npm_tag }}"
37+
npm install "@apify/actors-mcp-server@${VERSION}" @apify/mcpc
4438
4539
- name: Smoke test MCP server via mcpc
4640
working-directory: smoke-test
4741
run: |
48-
echo '{"mcpServers":{"s":{"command":"node","args":["node_modules/@apify/actors-mcp-server/dist/stdio.js","--tools","docs","--telemetry-enabled","false"]}}}' > .mcp.json
49-
npx mcpc --config .mcp.json stdio connect @s
50-
npx mcpc @s ping
51-
npx mcpc --json @s tools-list | jq -e 'length > 0'
52-
npx mcpc --json @s tools-call search-apify-docs query:="web scraping" docSource:="apify" | jq -e '.content[0].text'
53-
npx mcpc @s disconnect
42+
echo '{"mcpServers":{"dev":{"command":"node","args":["node_modules/@apify/actors-mcp-server/dist/stdio.js","--tools","docs,search-actors,fetch-actor-details","--telemetry-enabled","false"]}}}' > .mcp.json
43+
npx mcpc connect .mcp.json:dev @dev
44+
npx mcpc @dev ping
45+
npx mcpc --json @dev tools-list | jq -e 'length > 0'
46+
npx mcpc --json @dev tools-call search-actors keywords:="web scraper" | jq -e '.content[0].text'
47+
npx mcpc --json @dev tools-call search-apify-docs query:="web scraping" docSource:="apify" | jq -e '.content[0].text'
48+
npx mcpc @dev close

‎.github/workflows/test_smoke_test.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ jobs:
1818
uses: ./.github/workflows/_smoke_test_npm_package.yaml
1919
with:
2020
npm_tag: beta
21+
22+
smoke_test_version:
23+
name: Smoke test (exact version)
24+
uses: ./.github/workflows/_smoke_test_npm_package.yaml
25+
with:
26+
version: 0.9.18

0 commit comments

Comments
 (0)