-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (78 loc) · 2.89 KB
/
Copy pathci.yml
File metadata and controls
84 lines (78 loc) · 2.89 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
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
dco:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- name: Require DCO sign-off on every PR commit
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
for commit in $(git rev-list "$BASE_SHA..$HEAD_SHA"); do
git show --no-patch --format='%B' "$commit" | \
grep -Eq '^Signed-off-by: .+ <[^>]+>$'
done
hygiene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- name: Check the tree for real secrets and unexpected endpoints
run: python3 scripts/check_public_hygiene.py --root .
test:
strategy:
fail-fast: false
matrix:
python: ["3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python }}
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
version: "0.11.32"
enable-cache: true
cache-dependency-glob: uv.lock
- run: uv sync --frozen --extra dev
- run: uv run --frozen --extra dev ruff check .
- run: uv run --frozen --extra dev python -m compileall -q plugins scripts
- run: uv run --frozen --extra dev python -m pytest -q
- run: node --check plugins/openclaw/index.js
- name: Validate every manifest parses as JSON
run: |
python3 - <<'EOF'
import json
from pathlib import Path
skip = {".git", ".venv", "__pycache__", ".pytest_cache", ".ruff_cache", "dist", "htmlcov", "node_modules"}
files = sorted(p for p in Path(".").rglob("*.json") if not any(part in skip for part in p.parts))
assert files, "no JSON files found"
for path in files:
json.loads(path.read_text(encoding="utf-8"))
print(f"OK: {len(files)} JSON manifests parse")
EOF
- run: uv run --frozen --extra dev python scripts/build_release.py
- run: uv run --frozen --extra dev python scripts/build_release.py --check
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4