whichdisk 0.4.0

Cross-platform disk/volume resolver — given a path, tells you which disk it's on, its mount point, relative path, and disk usage
Documentation
name: coverage

on:
  push:
    branches:
      - main
    paths-ignore:
      - 'README.md'
      - 'COPYRIGHT'
      - 'LICENSE*'
      - '**.md'
      - '**.txt'
      - 'art'
  pull_request:
    paths-ignore:
      - 'README.md'
      - 'COPYRIGHT'
      - 'LICENSE*'
      - '**.md'
      - '**.txt'
      - 'art'
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  coverage-report:
    name: Generate Coverage for ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
    steps:
      - uses: actions/checkout@v6
      - name: Install latest nightly
        uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          override: true
      - name: Install cargo-tarpaulin
        run: cargo install cargo-tarpaulin
      - name: Run Coverage and Generate Report
        run: |
          mkdir -p coverage
          cargo tarpaulin --run-types doctests --run-types tests --run-types lib --run-types bins --out xml --output-dir coverage/${{ matrix.os }} -j 1
      - name: Upload Coverage Report as Artifact
        uses: actions/upload-artifact@v7
        with:
          name: ${{ matrix.os }}
          path: coverage/${{ matrix.os }}/cobertura.xml

  upload-codecov:
    needs: coverage-report
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Download all coverage reports
        uses: actions/download-artifact@v8
        with:
          path: reports/
      - name: List contents of the reports directory
        run: ls -a reports
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v6
        with:
          directory: reports
          fail_ci_if_error: false
          slug: ${{ github.repository }}
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}