From cad0b0a3664211960dfe6e81ff9afe91934a0eba Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 5 Feb 2026 16:39:19 +0000 Subject: add rust validator --- .github/workflows/test-validators.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to '.github') diff --git a/.github/workflows/test-validators.yml b/.github/workflows/test-validators.yml index 3d9eef8..1396fd2 100644 --- a/.github/workflows/test-validators.yml +++ b/.github/workflows/test-validators.yml @@ -119,3 +119,34 @@ jobs: else echo "Correctly detected invalid file" fi + + test-rust: + name: Test Rust Validator + runs-on: ubuntu-latest + container: + image: rust:latest + steps: + - uses: actions/checkout@v4 + + - name: Build validator + working-directory: validators/rust + run: cargo build --release + + - name: Validate minimal example + run: ./validators/rust/target/release/validate examples/minimal.gitinfo + + - name: Validate open-source-project example + run: ./validators/rust/target/release/validate examples/open-source-project.gitinfo + + - name: Validate mirror-only example (JSONC with comments) + run: ./validators/rust/target/release/validate examples/mirror-only.gitinfo + + - name: Test invalid file detection + run: | + echo '{"invalid_field": "should fail"}' > /tmp/invalid.gitinfo + if ./validators/rust/target/release/validate /tmp/invalid.gitinfo; then + echo "Expected validation to fail but it passed" + exit 1 + else + echo "Correctly detected invalid file" + fi -- cgit v1.2.3