Repository navigation
74 lines (64 loc) · 2.57 KB
/
Copy pathsync.yml
File metadata and controls
74 lines (64 loc) · 2.57 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
name: Sync from PyPI
on:
schedule:
- cron: "17 6 * * *" # daily, 06:17 UTC
workflow_dispatch:
inputs:
version:
description: "comet-ml version to sync (blank = latest)"
required: false
default: ""
# The job pushes with the deploy key in the sync environment (the only
# actor, besides repository admins, that the rulesets let push branches and
# tags), so the token needs no write access.
permissions:
contents: read
concurrency:
group: sync
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-latest
environment: sync # holds SYNC_DEPLOY_KEY; only main can use it
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0 # need tags to detect already-synced versions
ssh-key: ${{ secrets.SYNC_DEPLOY_KEY }}
persist-credentials: true # update_repo.py --push uses it
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: "3.12"
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Sync
env:
VERSION: ${{ inputs.version }}
run: |
if [ -n "$VERSION" ]; then
python update_repo.py . --version "$VERSION" --push
else
python update_repo.py . --push
fi
# The examples are the skills' tests. Without a Comet key in CI, run the
# parts that need no server: offline training and view dry runs.
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "22"
- name: Run the examples offline
run: |
VERSION=$(git describe --tags --abbrev=0)
python -m pip install --quiet "comet-ml==$VERSION" scikit-learn pandas pillow
python examples/run_examples.py --offline
# The skills must only cite APIs that exist in the synced comet_ml/, and
# their docs links must resolve. A failure here means a release (or a
# docs change) broke something a skill relies on: the code is already
# synced, and the skill or example needs updating. comet-mcp, in the
# range .mcp.json uses, lets check 7 compare the skills' MCP tool names
# and arguments with the real server.
- name: Check skills against the synced SDK
run: |
python -m pip install --quiet "comet-mcp>=1.5,<2"
python scripts/check_skills.py --check-urls