Add standard README footer #87
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Run Python validator tests | |
| run: cd validators && python -m unittest test_shadow_score -v | |
| - name: Validate JSON schema syntax | |
| run: python -c "import json; json.load(open('validators/shadow-report-schema.json'))" | |
| - name: Validate example JSON files | |
| run: | | |
| python -c " | |
| import json, pathlib, sys | |
| ok = True | |
| for p in pathlib.Path('examples').rglob('*.json'): | |
| try: | |
| json.load(open(p)) | |
| print(f' ok {p}') | |
| except Exception as e: | |
| print(f' FAIL {p}: {e}') | |
| ok = False | |
| sys.exit(0 if ok else 1) | |
| " | |
| - name: Set up Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: "1.21" | |
| - name: Build Go validator | |
| run: cd validators && go build -o /tmp/shadow-score-go . | |
| - name: Smoke-test Go validator (perfect score) | |
| run: | | |
| /tmp/shadow-score-go --sealed examples/01-perfect-score/sealed-results.json \ | |
| --open examples/01-perfect-score/open-results.json --format summary | |
| - name: Smoke-test Go validator (threshold pass) | |
| run: | | |
| /tmp/shadow-score-go --sealed examples/02-minor-gaps/sealed-results.json \ | |
| --threshold 15 | |
| - name: Smoke-test Go validator (threshold fail exits 1) | |
| run: | | |
| /tmp/shadow-score-go --sealed examples/03-critical-gaps/sealed-results.json \ | |
| --threshold 15 && exit 1 || exit 0 |