fix(ci): handle qmlformat binary name across Ubuntu versions #2
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: | |
| 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 | |
| # qt6-declarative-dev-tools provides qmlformat on Ubuntu 22.04; | |
| # qml6format is the package name on Ubuntu 24.04+. | |
| # Try both; at least one must succeed. | |
| sudo apt-get install -y qt6-declarative-dev-tools || \ | |
| sudo apt-get install -y qml6format | |
| - name: Lint Markdown | |
| run: bash scripts/lint-markdown.sh | |
| - name: Validate QML syntax | |
| run: bash scripts/validate-qml.sh |