1name: codecov 2 3env: 4 # It's really `--all-features`, but not adding the mutually exclusive features from rkyv 5 ALL_NON_EXCLUSIVE_FEATURES: --features "default unstable-locales rkyv-64 rkyv-validation rustc-serialize serde arbitrary" 6 7on: 8 push: 9 branches: [main, 0.4.x] 10 pull_request: 11jobs: 12 # Run code coverage using cargo-llvm-cov then upload to codecov.io 13 job_code_coverage: 14 name: llvm-cov 15 runs-on: ubuntu-latest 16 env: 17 CARGO_TERM_COLOR: always 18 steps: 19 - uses: actions/checkout@v4 20 # nightly is required for --doctests, see cargo-llvm-cov#2 21 - name: Install Rust (nightly) 22 run: rustup update nightly 23 - name: Install cargo-llvm-cov 24 uses: taiki-e/install-action@cargo-llvm-cov 25 - name: Generate code coverage 26 run: cargo +nightly llvm-cov ${{ env.ALL_NON_EXCLUSIVE_FEATURES }} --workspace --lcov --doctests --output-path lcov.info 27 - name: Upload coverage to Codecov 28 uses: codecov/codecov-action@v4 29 env: 30 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 31 with: 32 files: lcov.info 33 fail_ci_if_error: true 34