docs: complete project README and documentation #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI / 持续集成 | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - run: cargo fmt --all -- --check | |
| - run: cargo clippy --all-targets --all-features -- -D warnings | |
| - run: cargo test | |
| - run: python -m compileall -q python | |
| - run: PYTHONPATH=python python -m unittest discover -s python/tests -v | |
| - name: Validate scenario schema JSON | |
| run: python -m json.tool schemas/scenario.schema.json >/dev/null | |
| - name: Run passing reference scenario | |
| run: cargo run --quiet -- run examples/reference-clean.yml --output .forgetproof/runs | |
| - name: Verify evidence bundle | |
| shell: bash | |
| run: | | |
| bundle=$(find .forgetproof/runs -mindepth 1 -maxdepth 1 -type d | head -1) | |
| cargo run --quiet -- verify "$bundle" | |
| - name: Check leaky reference is detected | |
| shell: bash | |
| run: | | |
| set +e | |
| cargo run --quiet -- run examples/reference-leaky.yml --output .forgetproof/leaky-runs | |
| code=$? | |
| test "$code" -eq 1 | |
| - name: Upload evidence bundles | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: forgetproof-evidence | |
| path: .forgetproof/ | |
| if-no-files-found: ignore |