-
-
Notifications
You must be signed in to change notification settings - Fork 138
93 lines (74 loc) · 2.56 KB
/
test-publish.yml
File metadata and controls
93 lines (74 loc) · 2.56 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
name: Test Publish (Dry Run)
on:
push:
branches:
- multi-language-support
pull_request:
branches:
- multi-language-support
jobs:
test-js-packages:
name: Test JS Packages (Core & SDK)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies (Root)
run: npm ci
- name: Simulate Version Update (Dry Run)
run: node scripts/update-versions.js 0.5.0
- name: Generate SDKs
run: npm run generate:sdk:all --workspace=pmxt-core
- name: Build All Workspaces
run: npm run build --workspaces
- name: Start PMXT Server
run: |
npm run server --workspace=pmxt-core &
# Wait for server to be ready
echo "Waiting for server to start..."
timeout 30 bash -c 'until curl -s http://localhost:3847/health > /dev/null; do sleep 1; done'
echo "Server is ready!"
- name: Test All Workspaces
run: npm test --workspaces
- name: Dry Run Publish pmxt-core
run: npm publish --workspace=pmxt-core --dry-run
- name: Dry Run Publish pmxtjs
run: npm publish --workspace=pmxtjs --dry-run
test-python-package:
name: Test Python Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install build tools & dependencies
run: |
python -m pip install --upgrade pip
pip install build twine pytest
pip install .
working-directory: sdks/python
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Node dependencies & Start Server & Simulate Version
run: |
npm ci
node scripts/update-versions.js 0.5.0
npm run generate:sdk:all --workspace=pmxt-core
npm run build --workspace=pmxt-core
npm run server --workspace=pmxt-core &
# Wait for server
timeout 30 bash -c 'until curl -s http://localhost:3847/health > /dev/null; do sleep 1; done'
- name: Run Tests
run: pytest
working-directory: sdks/python
- name: Build Package
run: python -m build
working-directory: sdks/python
- name: Verify Package Metadata
run: twine check dist/*
working-directory: sdks/python