fix: Upload SDK files via input_files for example validation

Examples import SDK libraries (from un import execute_code, etc.) which
aren't available in the sandbox. Instead of making examples standalone
(which defeats the purpose), upload SDK source files via the API's
input_files parameter and rewrite import paths to /tmp/input/.

Changes:
- validate-examples.sh: detect SDK src dir, base64-encode files into
  input_files JSON, rewrite Python/JS/Ruby/PHP import paths, pipe
  request body via stdin to avoid arg length limits
- validate-examples.sh: add JUnit XML generation (science-results.xml)
- .gitlab-ci.yml: remove allow_failure from science-validate-examples
  and validate-examples jobs
- .gitignore: add science-results/ (CI artifacts, not source)
- git rm science-results/ (committed "100% pass" was a lie)
This commit is contained in:
russell@unturf.com 2026-02-16 06:52:23 -05:00
parent 710eb5d9ac
commit b3ed0f808d
5 changed files with 173 additions and 217 deletions

View file

@ -168,7 +168,6 @@ science-validate-examples:
paths:
- science-results/
expire_in: 30 days
allow_failure: true
only:
- main
- /^\d+\.\d+\.\d+$/
@ -231,7 +230,6 @@ validate-examples:
paths:
- science-results/
expire_in: 30 days
allow_failure: true
only:
- main
- /^\d+\.\d+\.\d+$/