Skip to content

Tutorial Validate In CI

Marko Koljancic edited this page May 25, 2026 · 5 revisions

Home

Tutorial: Validate in CI

Take a solarxy.toml you authored locally, run batch validation against an asset folder, then wire the same command into a GitHub Actions workflow that annotates pull requests inline.

Phase 1 scaffold. The full tutorial lands in Phase 2. See CI/CD Integration for the recipe reference and CLI Reference for every flag.


Goal

Phase 2: a PR that flags a bad asset before merge, with findings visible inline.


Setup

Phase 2: an existing repo with an assets/ directory of .glb files and a GitHub Actions runner.


Steps

Phase 2:

  1. Author a starter solarxy.toml with a triangle budget and one [[filenames.rules]].
  2. Run solarxy-cli --mode analyze --paths "assets/**/*.glb" locally.
  3. Add the GitHub Actions workflow from CI/CD Integration → GitHub Actions.
  4. Open a PR with a deliberately bad asset; observe inline annotations.
  5. Switch the workflow to SARIF for Code Scanning; observe the Security tab.

Screenshots to capture:

  • img/tutorial-analyze-tui.png - the local Analyze TUI showing findings.
  • img/tutorial-pr-annotations.png - GitHub PR with inline annotations.

Verify

Phase 2: PR status check goes red on a bad asset, green after fixing.


What you learned

Phase 2: why --mode analyze is required for --paths, the adapter / format matrix, and when SARIF beats workflow-command annotations.


Where to go next

Phase 2: pointers to CI/CD Integration, the policy tutorial, and Validation Reference.


See also: CI/CD Integration · CLI Reference · Configuration · Tutorial: Build a custom validation policy

Clone this wiki locally