Skip to content

Introduce SSOT spec pipeline with ANTLR AST parser, conformance corpu… #10

Introduce SSOT spec pipeline with ANTLR AST parser, conformance corpu…

Introduce SSOT spec pipeline with ANTLR AST parser, conformance corpu… #10

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
quality:
name: Static analysis and formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run quality checks
run: |
python -m black --check src tests scripts
python -m isort --check-only src tests scripts
python scripts/spec/validate_spec.py
python scripts/spec/validate_corpus.py
python scripts/spec/generate_rules.py --check
python scripts/spec/generate_parser.py --check
python scripts/spec/generate_expansion.py --check
python scripts/spec/generate_commands.py --check
python scripts/spec/generate_docs.py --check
python scripts/spec/generate_grammar_rules.py --check
python scripts/spec/audit_ssot.py --strict
python -m mypy src/blinter tests scripts/verify.py
python -m pylint src/blinter
python -m bandit -r src/blinter -c pyproject.toml -ll -q
test-python:
name: pytest (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run tests
run: |
python -m pytest tests/test_spec_corpus.py tests/test_spec_parser.py
python -m pytest
test-windows-exe:
name: Windows executable smoke tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Create virtual environment
run: python -m venv venv
- name: Install dependencies in virtual environment
run: |
.\venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade wheel
python -m pip install --upgrade pyinstaller
python -m pip install --upgrade -r requirements.txt
shell: pwsh
- name: Generate version info file
run: |
.\venv\Scripts\Activate.ps1
python scripts/generate_file_version_info.py
shell: pwsh
- name: Build executable
run: |
.\venv\Scripts\Activate.ps1
pyinstaller Blinter.spec
shell: pwsh
- name: Verify executable exists
run: |
if (-not (Test-Path -Path "dist\Blinter.exe" -PathType Leaf)) {
throw "dist\Blinter.exe was not produced by PyInstaller"
}
shell: pwsh
- name: Install Blinter for parity checks
run: |
.\venv\Scripts\Activate.ps1
python -m pip install -e .
shell: pwsh
- name: Run cmd.exe corpus oracle
run: |
.\venv\Scripts\Activate.ps1
python scripts/spec/cmd_oracle.py
shell: pwsh
- name: Smoke test executable
run: .\scripts\test_exe_smoke.ps1 -ExePath .\dist\Blinter.exe
shell: pwsh