Merge pull request #51 from 01rabbit/codex/refactor-repository-for-gi… #3
Workflow file for this run
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: | |
| lint-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest jsonschema pyyaml | |
| - name: Schema validate | |
| run: | | |
| python - <<'PY' | |
| import json | |
| from pathlib import Path | |
| import jsonschema | |
| import yaml | |
| schema = json.loads(Path('configs/azazel.schema.json').read_text()) | |
| document = yaml.safe_load(Path('configs/azazel.yaml').read_text()) | |
| jsonschema.validate(document, schema) | |
| print('schema: OK') | |
| PY | |
| - name: Pytest | |
| run: pytest tests/unit -q | |
| - name: Shell lint | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y shellcheck | |
| find scripts -name "*.sh" -print0 | xargs -0 -I{} shellcheck {} |