Skip to content

fix tests

fix tests #52

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
VALGRINDFLAGS: --show-reachable=no --show-possibly-lost=no
RUST_BACKTRACE: 1
jobs:
rust:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup
run: |
sudo apt install -y valgrind &
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash &
rustup default nightly && rustup component add clippy &
wait
cargo binstall -y cargo-valgrind cargo-llvm-cov
- name: Check & Lint
run: RUSTFLAGS="-D warnings" cargo clippy --all-targets && cargo clippy -r --all-targets
- name: Test debug build
run: cd tests && cargo test --tests && cargo valgrind test --tests
- name: Test release build
run: cd tests && cargo test -r --tests && cargo valgrind test -r --tests
- name: Generate test coverage
run: cd tests && cargo llvm-cov --all-features --codecov --output-path codecov.json --disable-default-ignore-filename-regex --ignore-filename-regex \(.cargo/registry\|rustc\)
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
slug: davidzeng0/xx-core