Skip to content

refactor(vex): split src/vex.rs by format into module directory #120

refactor(vex): split src/vex.rs by format into module directory

refactor(vex): split src/vex.rs by format into module directory #120

Workflow file for this run

# Pinned to MSRV (1.88) intentionally; bump deliberately when updating Cargo.toml rust-version.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
pull-requests: write
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88
with:
components: rustfmt
- run: cargo fmt --all --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --all-features -- -D warnings
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-features
# Informational coverage report. Emits the lcov file as an artifact
# (named `coverage-lcov` — NOT `lcov.info`, since the bare `.info` TLD
# gets autolinked to a fake parked domain by email/feed renderers that
# strip Markdown backticks) and posts a sticky PR comment with the
# line-coverage %. Intentionally NOT in the required-status-checks
# list and NOT using `--fail-under-lines` — let the number be visible
# across 2-3 releases before ratcheting (see CONTRIBUTING.md
# "Coverage").
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --locked
- name: Run coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload lcov artifact
uses: actions/upload-artifact@v7
with:
name: coverage-lcov
path: lcov.info
retention-days: 30
- name: Compute coverage %
id: compute
run: |
covered=$(grep "^DA:" lcov.info | awk -F, '$2>0' | wc -l)
total=$(grep -c "^DA:" lcov.info)
if [ "$total" -gt 0 ]; then
pct=$(awk "BEGIN{printf \"%.1f\", ${covered}*100/${total}}")
else
pct="N/A"
fi
echo "pct=$pct" >> "$GITHUB_OUTPUT"
echo "covered=$covered" >> "$GITHUB_OUTPUT"
echo "total=$total" >> "$GITHUB_OUTPUT"
- name: Post coverage summary as PR comment
if: github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v3
with:
header: bomdrift-coverage
message: |
## Coverage report
Line coverage: **${{ steps.compute.outputs.pct }}%** (${{ steps.compute.outputs.covered }} / ${{ steps.compute.outputs.total }} lines)
Full lcov report available as workflow artifact **coverage-lcov**: [download from this run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts).
<sub>v0.9.8 introduces this report; `--fail-under-lines` will be added once coverage is visible across 2–3 releases.</sub>
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Pinned to the post-v2.0.0 Node 24 commit (2026-03-20) until
# rustsec re-tags. The v2 / v2.0.0 tags still point at the
# September 2024 commit which targets Node 20 and would emit a
# deprecation warning.
- uses: rustsec/audit-check@858dc40f52ca2b8570b7a997c1c4e35c6fc9a432 # v2 Node 24
with:
token: ${{ secrets.GITHUB_TOKEN }}
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
# Catch crate-metadata regressions (missing fields, oversized package,
# `exclude` slipping such that build-time `include_str!`'d files are
# dropped from the crate) BEFORE they reach a release tag. Mirrors what
# `cargo publish` will do at release time, but never actually uploads.
# Path-filtered to keep PR runs cheap.
publish-dry-run:
name: cargo publish --dry-run
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- run: cargo publish --dry-run --locked
shell-bridges:
name: shell-bridges (parser tests + regex sync)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: comment-suppress parser unit tests
run: bash comment-suppress/test.sh
- name: suppress-regex sync (shell ↔ bridge JS)
run: bash scripts/check-suppress-regex-sync.sh
- name: bash syntax check (scripts/, comment-suppress/)
run: |
for f in scripts/*.sh comment-suppress/*.sh; do
[ -f "$f" ] || continue
bash -n "$f"
done
- name: node syntax check (bridge workers)
run: |
for f in examples/*/comment-bridge/worker.js; do
[ -f "$f" ] || continue
node --check "$f"
done