Skip to content

fix(ci): graceful fallback when qmlformat is unavailable #3

fix(ci): graceful fallback when qmlformat is unavailable

fix(ci): graceful fallback when qmlformat is unavailable #3

Workflow file for this run

name: Quality
on:
pull_request:
push:
branches:
- main
jobs:
quality:
name: Lint Markdown + Validate QML
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Qt tools
run: |
sudo apt-get update
# Try every known package that ships a QML formatter across distros.
# Never fail the step — the validate script handles missing binaries
# gracefully (warning only).
for pkg in qt6-declarative-dev-tools qml6-tools qml6format qmlformat; do
sudo apt-get install -y "$pkg" 2>/dev/null && break || true
done
echo "QML formatter search:"
command -v qmlformat 2>/dev/null && echo " found: qmlformat" || true
command -v qml6format 2>/dev/null && echo " found: qml6format" || true
command -v qmlformat6 2>/dev/null && echo " found: qmlformat6" || true
- name: Lint Markdown
run: bash scripts/lint-markdown.sh
- name: Validate QML syntax
run: bash scripts/validate-qml.sh