-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.28 KB
/
Copy pathgraphify.yml
File metadata and controls
81 lines (70 loc) · 2.28 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
# .github/workflows/graphify.yml
name: Graphify Consistency Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-graph:
runs-on: ubuntu-latest
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Setup Rust & Cargo
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo Registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Upgrade Pip & Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Print Version Diagnostics
run: |
echo "=== Version Diagnostics ==="
python --version
pip --version
rustc --version
cargo --version
graphify --version
echo "==========================="
- name: Run Graphify Update
run: |
python tools/scripts/update_graphify.py
- name: Run Graphify Output Validation
run: |
python tools/scripts/check_graphify.py
- name: Verify Graph Invariant (No Uncommitted Changes)
if: env.GEMINI_API_KEY != ''
run: |
# Verify that the generated graph files match the committed files in git.
# If there is any diff, the CI workflow fails.
# We only fail if there are differences to ensure that the developer kept the graph up-to-date.
git diff --exit-code graphify-out/
- name: Upload Graphify Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: graphify-artifacts-python-${{ matrix.python-version }}
path: |
graphify-out/
logs/
if-no-files-found: warn