Skip to content

Commit d16f14b

Browse files
committed
Ensure FracturedJson is checked out
1 parent 20355c5 commit d16f14b

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/run-all-tests.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,39 @@ jobs:
1717
python-version: ["3.11", "3.12", "3.13"]
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- name: Checkout repo with submodules
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
submodules: recursive
25+
persist-credentials: true
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Sync and update FracturedJson submodule to tip of main
29+
run: |
30+
set -euo pipefail
31+
# Ensure .gitmodules remotes are in sync and initialize submodules
32+
git submodule sync --recursive
33+
git submodule update --init --recursive
2134
35+
# Force FracturedJson to origin/main (robust for shallow clones)
36+
if [ -d "FracturedJson" ]; then
37+
pushd FracturedJson
38+
git fetch --no-tags origin main
39+
if git rev-parse --verify origin/main >/dev/null 2>&1; then
40+
git checkout -B main origin/main
41+
git reset --hard origin/main
42+
else
43+
echo "ERROR: origin/main not found for FracturedJson"
44+
git show-ref || true
45+
exit 1
46+
fi
47+
popd
48+
else
49+
echo "ERROR: FracturedJson directory not found after init"
50+
exit 1
51+
fi
52+
2253
- name: Install uv and set the python version
2354
uses: astral-sh/setup-uv@v5
2455
with:

0 commit comments

Comments
 (0)