-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (89 loc) · 3.07 KB
/
Copy pathquality.yml
File metadata and controls
110 lines (89 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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