name: coverage

env:
  RUST_BACKTRACE: 1

jobs:
  codecov:
    name: codecov
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions-rust-lang/setup-rust-toolchain@v1
    - uses: taiki-e/install-action@v2
      with: { tool: cargo-tarpaulin }
    - run: cargo --locked tarpaulin --all-features -- --skip 'proptest::'
    - uses: codecov/codecov-action@v5
      env:
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
    types: [opened, synchronize, reopened, ready_for_review]
  schedule:
  - cron: '0 0 * * 5'
