Files
craft-libs/.github/workflows/sonarcloud.yml
T
Dylan M. Taylor e4a6b68e5a ci: lint and test the format crates, and measure the codec features in coverage (#849)
Twelve format crates had no workflow of their own: xml, mime, cfb, mesh,
metafile, dxf, gcode, svg-paths, silhouette-studio, tiff, heif and cms
(cms ran only under the PDF workflow's paths). formats.yml runs fmt,
clippy (default, each feature alone, all features), the tests and a
wasm32 check for each.

The coverage build compiled none of the codec code that sits behind
features that are off by default, so new code in craft-video, craft-audio
and craft-media read as untested and failed the quality gate. The
SonarCloud job now passes those features to the shared workflow.

video.yml's per-feature clippy also covers vp9-decode and vp9-encode.
2026-11-11 18:36:52 -05:00

28 lines
1.1 KiB
YAML

name: SonarCloud
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: sonarcloud-${{ github.ref }}
# A push to main is the run that publishes coverage; superseded runs there would never finish.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
sonarcloud:
# Track shared CI improvements on main.
uses: storytold/craft-common-actions/.github/workflows/sonarcloud.yml@main
with:
pdf-test-fonts: true
# The codec and format code behind features that are off by default. Without these the
# coverage build never compiles it, and new code there reads as untested.
cargo-features: >-
craft-video/dnx,craft-video/vp8,craft-video/prores,craft-video/h264,craft-video/hevc,craft-video/vp9,craft-video/av1,craft-video/threads,craft-audio/decode,craft-audio/encode,craft-audio/peaks,craft-audio/rayon,craft-audio/serde,craft-media/matroska,craft-media/ogg,craft-media/bitstream,craft-media/serde,craft-mesh/stl,craft-mesh/obj,craft-mesh/ply,craft-mesh/gltf,craft-metafile/write
secrets: inherit