Skip to content

Update rust.yml

Update rust.yml #251

Workflow file for this run

name: Rust
on: [push]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: clean
run: cargo clean
- name: Build
run: cargo build --verbose
env:
RUST_BACKTRACE: 1
- name: Run tests
run: cargo test --verbose
env:
RUST_BACKTRACE: 1
publish_metrics:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate and publish code coverage
#This is a crappy work around. Got issues as tarpaulin seems to be running `cargo test -- --test-threads 1
# which seems to not work w/ the used version of cucumber-rust.
#Changhing harness = true work around the pb...
#Also seems like cucumber tests are part of coverage measures (which is nice)
run: |
cargo install cargo-tarpaulin
sed -i 's/harness = false/harness = true/g' `pwd`/adr_core_local_impl/Cargo.toml
RUST_BACKTRACE=full cargo tarpaulin --release --out Lcov --coveralls 1fa078wMaKHyxnGDX5NBJ0cXp2CpyQyrd
#cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml