Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: avoid collecting coverage data on local dev #1519

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
cairo_programs/**/*.json
!cairo_programs/manually_compiled/*
examples/wasm-demo/src/array_sum.json
TEST_COLLECT_COVERAGE: 1
PROPTEST_CASES: 100

jobs:
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,20 @@ cairo-vm_proof_trace: $(CAIRO_RS_TRACE_PROOF) $(CAIRO_RS_MEM_PROOF) $(CAIRO_RS_A
cairo_trace: $(CAIRO_TRACE) $(CAIRO_MEM)
cairo-vm_trace: $(CAIRO_RS_TRACE) $(CAIRO_RS_MEM)

TEST_COMMAND:=cargo nextest run
ifdef TEST_COLLECT_COVERAGE
TEST_COMMAND:=cargo llvm-cov nextest --no-report
endif

test: cairo_proof_programs cairo_test_programs cairo_1_test_contracts cairo_2_test_contracts
cargo llvm-cov nextest --no-report --workspace --features "test_utils, cairo-1-hints"
$(TEST_COMMAND) --workspace --features "test_utils, cairo-1-hints"
test-no_std: cairo_proof_programs cairo_test_programs
cargo llvm-cov nextest --no-report --workspace --features test_utils --no-default-features
$(TEST_COMMAND) --workspace --features test_utils --no-default-features
test-wasm: cairo_proof_programs cairo_test_programs
# NOTE: release mode is needed to avoid "too many locals" error
wasm-pack test --release --node vm --no-default-features
test-extensive_hints: cairo_proof_programs cairo_test_programs
cargo llvm-cov nextest --no-report --workspace --features "test_utils, cairo-1-hints, extensive_hints"
$(TEST_COMMAND) --workspace --features "test_utils, cairo-1-hints, extensive_hints"

check-fmt:
cargo fmt --all -- --check
Expand Down
Loading