panache 2.43.0

An LSP, formatter, and linter for Markdown, Quarto, and R Markdown
name: Code Coverage

on:
  push:
    branches:
      - main

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  coverage:
    name: Code Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: 1.94.1
          components: llvm-tools-preview

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

      - name: Cache Rust artifacts
        uses: Swatinem/rust-cache@v2

      - name: Build binary
        run: cargo build --verbose

      - name: Install shfmt for external formatter tests
        run: sudo apt-get update && sudo apt-get install -y shfmt

      - name: Generate coverage
        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v6
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          slug: jolars/panache
          fail_ci_if_error: true
          files: lcov.info