fix(release-check): route --json to the machine contract (#79) #207
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: Quality | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| shell-lint: | |
| name: Shell syntax check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install zsh | |
| run: sudo apt-get install -y zsh | |
| - name: Skills are consistent (frontmatter, cross-refs, paths, SKILLS.md) | |
| run: ./scripts/check-skills.sh | |
| - name: Runtime authority freeze (no new live -> mqlaunch-v1 edges) | |
| run: ./scripts/check-runtime-authority.sh | |
| - name: bash -n on install.sh | |
| run: bash -n install.sh | |
| - name: bash -n on release.sh | |
| run: bash -n release.sh | |
| - name: bash -n on scripts/ | |
| run: | | |
| if [ -d scripts ]; then | |
| find scripts -name "*.sh" -print0 | xargs -0 -n1 bash -n | |
| fi | |
| - name: Syntax check all .sh files by shebang (exclude backups/) | |
| run: | | |
| find . \ | |
| -name "*.sh" \ | |
| -not -path "./.git/*" \ | |
| -not -path "./backups/*" \ | |
| -print0 \ | |
| | while IFS= read -r -d '' f; do | |
| shebang="$(head -1 "$f")" | |
| if [[ "$shebang" == *zsh* ]]; then | |
| zsh -n "$f" || { echo "FAIL (zsh -n): $f"; exit 1; } | |
| else | |
| bash -n "$f" || { echo "FAIL (bash -n): $f"; exit 1; } | |
| fi | |
| done | |
| echo "All .sh files (excl. backups/) pass syntax check" | |
| - name: shellcheck on bash scripts (warn-only) | |
| run: | | |
| if command -v shellcheck >/dev/null 2>&1; then | |
| find . \ | |
| -name "*.sh" \ | |
| -not -path "./.git/*" \ | |
| -not -path "./backups/*" \ | |
| -print0 \ | |
| | while IFS= read -r -d '' f; do | |
| shebang="$(head -1 "$f")" | |
| if [[ "$shebang" != *zsh* ]]; then | |
| shellcheck --severity=error "$f" || true | |
| fi | |
| done | |
| else | |
| echo "shellcheck not available, skipping" | |
| fi | |
| - name: mqlaunch smoke suite | |
| run: MACOS_SCRIPTS_HOME="$GITHUB_WORKSPACE" MQ_NO_TUI=1 ./tools/scripts/test-all.sh | |
| docs-lint: | |
| name: Markdown lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Same tool and .markdownlint.json config as the pre-commit hook, but | |
| # WITHOUT --fix, so rules the hook cannot auto-fix (MD040, MD036, ...) | |
| # fail the build here instead of slipping through silently. | |
| - name: markdownlint all .md (no auto-fix) | |
| run: >- | |
| npx --yes markdownlint-cli "**/*.md" | |
| --ignore node_modules --ignore backups --ignore .git | |
| python-tests: | |
| name: Python tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install test dependencies | |
| run: python -m pip install -r requirements-dev.txt | |
| - name: Run B2 TUI tests | |
| run: python -m pytest mqlaunch/b2_tui/tests |