Daily Workflow #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily Workflow | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Run at midnight every day | |
jobs: | |
full-coverage: | |
name: Unit test and integration test coverage analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Install cargo-grcov | |
run: | | |
rustup component add llvm-tools-preview | |
cargo install grcov | |
- name: Generate coverage report for unit tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test --lib | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-lib.txt | |
- name: Generate coverage report for doc tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test --doc | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-docs.txt | |
- name: Generate coverage report for cosmic integr. tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test -- cosmic | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-cosmic.txt | |
- name: Generate coverage report for mission_design integr. tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test -- mission_design | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-mission_design.txt | |
- name: Generate coverage report for OD integr. tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test -- orbit_determination | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-od.txt | |
- name: Generate coverage report for propulsion integr. tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test -- propulsion | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-prop.txt | |
- name: Generate coverage report for monte carlo integr. tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw" | |
run: | | |
cargo test -- test_monte_carlo_epoch | |
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-mc.txt | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./lcov-*.txt |