tod 0.11.2

An unofficial Todoist command-line client
# This workflow is designed to run tests and collect code coverage data using Codecov to ensure code quality.

name: Codecov

permissions:
  contents: read  # Allow the workflow to read repository contents
  pull-requests: write  # Allow the workflow to write to pull requests

on:
  push:
    # Trigger the workflow on push    
    paths:
      - '**/*.rs'  # Run if there are changes in Rust source files.
      - '**/*.json'  # Run if there are changes in JSON files.
      - '**/*.lock'  # Run if there are changes in lock files.
      - '**/*.toml'  # Run if there are changes in TOML files.

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0
  CARGO_PROFILE_TEST_DEBUG: 0
  CARGO_PROFILE_RELEASE_LTO: true
  CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1

jobs:
  coverage:
    name: Codecov Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with:
         cache-all-crates: true
      - uses: taiki-e/install-action@v2
        with:
          tool: cargo-tarpaulin
          # Run cargo-tarpaulin to collect code coverage data and upload it to Codecov
      - name: Run tests with coverage
        run: cargo tarpaulin --all-features --out xml --frozen --skip-clean
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v5