Skip to content

Commit 818d664

Browse files
authored
Update format_questions.yml
1 parent 609df30 commit 818d664

File tree

1 file changed

+9
-59
lines changed

1 file changed

+9
-59
lines changed
Lines changed: 9 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Validate Question Bundles
1+
name: Build Question Bundles
22

33
on:
44
push:
@@ -7,20 +7,16 @@ on:
77
- 'questions/**'
88
- 'utils/**'
99
- 'schemas/**'
10-
- '.github/workflows/**' # ensure workflow edits retrigger
10+
- '.github/workflows/**'
1111
pull_request:
1212
paths:
1313
- 'questions/**'
1414
- 'utils/**'
1515
- 'schemas/**'
1616
- '.github/workflows/**'
1717

18-
concurrency:
19-
group: build-validate-${{ github.ref }}
20-
cancel-in-progress: true
21-
2218
jobs:
23-
format-validate:
19+
build-only:
2420
runs-on: ubuntu-latest
2521
steps:
2622
- uses: actions/checkout@v4
@@ -35,71 +31,25 @@ jobs:
3531

3632
- name: Install deps
3733
run: |
38-
set -euo pipefail
3934
python -m pip install --upgrade pip
40-
python -m pip install "jsonschema>=4.0,<5"
41-
42-
# ---------- quick sanity: are we running the right validator? ----------
43-
- name: Debug validator presence and contents
44-
run: |
45-
set -euo pipefail
46-
echo "Commit:"; git log -1 --oneline
47-
echo "::group::Search for any other validate_questions.py"
48-
git ls-files | grep -n 'validate_questions.py' || true
49-
echo "::endgroup::"
50-
echo "::group::Show utils/validate_questions.py (first 140 lines)"
51-
nl -ba utils/validate_questions.py | sed -n '1,140p'
52-
echo "::endgroup::"
53-
echo "::group::Check for old SCHEMA line"
54-
if grep -n 'SCHEMA = json.load(open("schemas/question.schema.json"))' -R utils; then
55-
echo "Found stale validator code; please ensure only the new path-robust version exists." >&2
56-
exit 1
57-
else
58-
echo "No stale SCHEMA loader found. Good."
59-
fi
60-
echo "::endgroup::"
61-
62-
# ---------- validate schema file itself, fail early & print context ----------
63-
- name: Validate schema JSON strictly (and print with line numbers)
64-
run: |
65-
set -euo pipefail
66-
echo "::group::schemas/question.schema.json (first 120 lines)"
67-
nl -ba schemas/question.schema.json | sed -n '1,120p' || true
68-
echo "::endgroup::"
69-
echo "Checking schema JSON with python -m json.tool..."
70-
python -m json.tool schemas/question.schema.json >/dev/null
71-
echo "Schema is valid JSON."
7235
7336
# ---------- build ----------
7437
- name: Build bundles into /build
75-
run: |
76-
set -euo pipefail
77-
python utils/build_bundle.py
38+
run: python utils/build_bundle.py
7839

7940
# ---------- verify something was built ----------
8041
- name: Check build outputs exist
8142
run: |
82-
set -euo pipefail
8343
test -d build || { echo "build/ does not exist"; exit 1; }
84-
ls -l build || true
44+
ls -l build
8545
shopt -s nullglob
8646
files=(build/*.json)
8747
((${#files[@]})) || { echo "No build/*.json files found"; exit 1; }
8848
89-
# ---------- validate ----------
90-
# Let the script default to build/*.json internally (safer than a fragile shell glob).
91-
- name: Validate bundles
92-
run: |
93-
set -euo pipefail
94-
python utils/validate_questions.py
95-
96-
# ---------- artifacts for debugging ----------
97-
- name: Upload artifacts (build + schema + validator)
49+
# ---------- artifact for debugging ----------
50+
- name: Upload build artifacts
9851
if: always()
9952
uses: actions/upload-artifact@v4
10053
with:
101-
name: question-bundles-and-schema
102-
path: |
103-
build/*.json
104-
schemas/question.schema.json
105-
utils/validate_questions.py
54+
name: question-bundles
55+
path: build/*.json

0 commit comments

Comments
 (0)