aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/test-validators.yml
diff options
context:
space:
mode:
authorAlex Pooley (@zuedev) <zuedev@gmail.com>2026-02-05 16:39:19 +0000
committerAlex Pooley (@zuedev) <zuedev@gmail.com>2026-02-05 16:39:19 +0000
commitcad0b0a3664211960dfe6e81ff9afe91934a0eba (patch)
tree731cecc411d5682f7805477f207ab40eab4654cd /.github/workflows/test-validators.yml
parentf9584d5777618f860bc3a8ee880f339954092ac0 (diff)
downloadgitinfo-cad0b0a3664211960dfe6e81ff9afe91934a0eba.tar
gitinfo-cad0b0a3664211960dfe6e81ff9afe91934a0eba.tar.gz
gitinfo-cad0b0a3664211960dfe6e81ff9afe91934a0eba.tar.bz2
gitinfo-cad0b0a3664211960dfe6e81ff9afe91934a0eba.tar.xz
gitinfo-cad0b0a3664211960dfe6e81ff9afe91934a0eba.zip
add rust validator
Diffstat (limited to '.github/workflows/test-validators.yml')
-rw-r--r--.github/workflows/test-validators.yml31
1 files changed, 31 insertions, 0 deletions
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