rust-j2k 0.4.0

Decodes JPEG 2000 images in pure Rust, for programs that need to read them without linking a C library.
Documentation
name: Coverage

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

jobs:
  rust-coverage:
    name: Rust coverage (cargo llvm-cov → Codecov)
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

      - name: Set up Rust
        uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # master
        with:
          toolchain: stable
          components: llvm-tools-preview

      - name: Cache cargo build
        uses: Swatinem/rust-cache@c8037a86dde8214a8310e9f54a8fc61ab362aa31 # v2

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@c509219cf42fba86913069efd0ade2458c59337b # v2
        with:
          tool: cargo-llvm-cov

      - name: Generate coverage report
        run: cargo llvm-cov --all-targets --lcov --output-path lcov.info

      - name: Upload to Codecov
        uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7
        with:
          files: lcov.info
          flags: rust
          token: ${{ secrets.CODECOV_TOKEN }}
          # The token is available on push and same-repo PRs; forked PRs can't
          # read repo secrets, so their upload is skipped. Keep fail_ci_if_error
          # off so that skip doesn't block contributors.
          fail_ci_if_error: false