Repository navigation
94 lines (77 loc) · 2.33 KB
/
Copy pathpublish-mcp-server.yaml
File metadata and controls
94 lines (77 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: ElasticGraph MCP Server Python Package
on:
# Manually trigger the piepline to publish to PyPI
workflow_dispatch:
pull_request:
paths:
- 'ai_tools/elasticgraph-mcp-server/**'
jobs:
test:
name: Test and Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ai_tools/elasticgraph-mcp-server
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install test dependencies
pip install ruff pytest pytest-cov pytest-asyncio
# Install package dependencies
pip install httpx "mcp[cli]>=1.3.0" packaging
# Install package in development mode
pip install -e .
- name: Run format check
run: ruff format . --check
- name: Run lint
run: ruff check .
- name: Run tests
run: pytest -v
build:
name: Build Package
needs: test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ai_tools/elasticgraph-mcp-server
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.13'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Upload dist as artifact
uses: actions/upload-artifact@v7.0.2
with:
name: python-package-distributions
path: ai_tools/elasticgraph-mcp-server/dist/
publish:
name: Publish to PyPI
needs: build
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/elasticgraph-mcp-server
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}