name: Rust
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install_grcov
run: cargo install grcov
- name: llvm-tools
run: rustup component add llvm-tools-preview
- name: rustflags
run: export RUSTFLAGS="-Cinstrument-coverage"
- name: Build
run: cargo build --verbose
- name: Run tests
run: LLVM_PROFILE_FILE="dayendar-%p-%m.profraw" cargo test --verbose
- name: Run_grcov
run: grcov . --binary-path ./target/debug/ -t lcov -s . --token df17b3cc-b591-4529-8b25-fcb15bed229f > lcov.info
- name: Install codecov client
run: bash <(curl -s https://codecov.io/bash)
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
run: bash <(curl -s https://codecov.io/bash) -f lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}