tod 0.17.0

An unofficial Todoist command-line client
# Collects code coverage using LLVM source-based instrumentation and uploads to Codecov.
# Uses cargo-llvm-cov + nextest so each test runs in its own process (required by
# src/debug.rs tests which use gag::BufferRedirect to capture stdout).

name: Codecov

permissions:
  contents: read
  pull-requests: write

on:
  push:
    branches:
      - main
    paths:
      - "**/*.rs"
      - "**/*.json"
      - "**/*.lock"
      - "**/*.toml"
  pull_request:
    paths:
      - "**/*.rs"
      - "**/*.json"
      - "**/*.lock"
      - "**/*.toml"

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

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0
  CARGO_PROFILE_TEST_DEBUG: 0

jobs:
  coverage:
    name: Codecov Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview
      - uses: Swatinem/rust-cache@v2
        with:
          cache-all-crates: true
          prefix-key: "v1-coverage"
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-llvm-cov,nextest
      - name: Run tests with coverage
        run: cargo llvm-cov nextest --profile ci --all-features --lcov --output-path lcov.info
      - name: Upload coverage to codecov.io
        uses: codecov/codecov-action@v7
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: lcov.info
          disable_search: true