Repository navigation
85 lines (80 loc) · 2.63 KB
/
Copy pathci.yml
File metadata and controls
85 lines (80 loc) · 2.63 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
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
node:
name: typescript + cli (node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci --no-audit --no-fund
# @okdata/sdk
- run: npm run typecheck -w typescript
- run: npm test -w typescript
- run: npm run build -w typescript
# okdata (the CLI), built against ../typescript through the workspace
- run: npm run typecheck -w cli
- run: npm test -w cli
- run: npm run build -w cli
- run: node cli/dist/bin.js --help
# @okdata/mcp, the local stdio bridge to the remote MCP server
- run: npm run typecheck -w mcp-typescript
- run: npm test -w mcp-typescript
- run: npm run build -w mcp-typescript
- run: npm pack --dry-run -w typescript -w cli -w mcp-typescript
python:
name: python ${{ matrix.python }}
# Ubuntu 26.04 (ubuntu-latest since 2026-10) has no Python 3.9 build; 24.04 has both versions.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.13"]
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install -e '.[test]'
- run: python -m pytest
# mypy no longer runs on 3.9; the tests above cover 3.9 itself.
- if: matrix.python == '3.13'
run: pip install mypy && python -m mypy
- if: matrix.python == '3.13'
name: build the sdist and wheel, with the generated code in them and nothing else
run: |
pip install build
python -m build
python -m zipfile -l dist/*.whl | grep -q 'okdata/_generated/_sync.py'
extra=$(tar tzf dist/*.tar.gz | grep -vE '^okdata-[^/]+/((src|tests)/.*|README\.md|LICENSE|pyproject\.toml|PKG-INFO|\.gitignore)?$' || true)
if [ -n "$extra" ]; then echo "unexpected files in the sdist:"; echo "$extra"; exit 1; fi
mcp-python:
name: mcp-python ${{ matrix.python }}
runs-on: ubuntu-24.04
strategy:
matrix:
python: ["3.10", "3.13"]
defaults:
run:
working-directory: mcp-python
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install -e '.[test]'
- run: python -m pytest