File tree Expand file tree Collapse file tree 6 files changed +30
-26
lines changed
Expand file tree Collapse file tree 6 files changed +30
-26
lines changed Original file line number Diff line number Diff line change 1+ [profile .default .junit ]
2+ path = " junit.xml"
Original file line number Diff line number Diff line change 7171 if : ${{ matrix.os == 'ubuntu-latest' }}
7272
7373 - name : Test
74- run : make tests-ci
74+ run : make coverage
7575 if : ${{ matrix.os == 'ubuntu-latest' }}
7676
7777 - name : Upload test results
@@ -80,12 +80,10 @@ jobs:
8080 check_name : Test Results
8181 github_token : ${{ secrets.GITHUB_TOKEN }}
8282 files : |
83- rust/junit.xml
84- js/junit.xml
85- python/junit.xml
83+ **/junit.xml
8684 if : ${{ matrix.os == 'ubuntu-latest' }}
8785
8886 - name : Upload coverage
89- uses : codecov/codecov-action@v4
87+ uses : codecov/codecov-action@v5
9088 if : ${{ matrix.os == 'ubuntu-latest' }}
9189
Original file line number Diff line number Diff line change 11.DEFAULT_GOAL := help
2- .PHONY : develop-py develop-js develop-rust develop build-js build-py build-rust build lint-py lint-js lint-rust lint fix-py fix-js fix-rust fix checks-py checks-js checks-rust checks tests-py tests-js tests-rust tests test tests-ci help
2+ .PHONY : develop-py develop-js develop-rust develop build-js build-py build-rust build lint-py lint-js lint-rust lint fix-py fix-js fix-rust fix checks-py checks-js checks-rust checks tests-py tests-js tests-rust tests test coverage-py coverage-rust coverage help
33
44develop-py :
55 make -C python develop
@@ -68,10 +68,13 @@ tests-rust:
6868tests : tests-rust tests-js tests-py # # Run the tests
6969test : tests
7070
71- tests-ci-rust :
72- make -C rust tests-ci
71+ coverage-py :
72+ make -C python coverage
7373
74- tests-ci : tests-ci-rust tests-py tests-js
74+ coverage-rust :
75+ make -C rust coverage
76+
77+ coverage : coverage-rust coverage-py tests-js
7578
7679# Thanks to Francoise at marmelab.com for this
7780help :
Original file line number Diff line number Diff line change @@ -32,10 +32,14 @@ fix: ## run autofixers
3232format : fix
3333
3434tests : # # run tests
35- python -m pytest -v transports/tests --junitxml=junit.xml --cov=transports --cov-branch --cov-fail-under=65 --cov-report term-missing --cov-report xml
35+ python -m pytest -v transports/tests --junitxml=junit.xml
3636
3737test : tests
3838
39+ coverage : # # run tests with coverage
40+ python -m pytest -v transports/tests --junitxml=junit.xml --cov=transports --cov-branch --cov-fail-under=65 --cov-report term-missing --cov-report xml
41+
42+
3943checks : # # run checks
4044 # python -m check_manifest
4145
Original file line number Diff line number Diff line change 11.DEFAULT_GOAL := help
2- .PHONY : dev build lint fix check tests tests-ci develop test format checks help
2+ .PHONY : dev build lint fix check tests coverage develop test format checks help
33
44dev : # # Install required dev dependencies
55 rustup component add rustfmt
66 rustup component add clippy
7- cargo install cargo2junit
8- cargo install grcov
7+ cargo install cargo-nextest
8+ cargo install cargo-llvm-cov
99 cargo install -f wasm-bindgen-cli
1010 rustup target add wasm32-unknown-unknown
11- rustup component add llvm-tools-preview
1211
1312build : # # Build release
1413 cargo build --release --all-features
@@ -24,19 +23,10 @@ check:
2423 cargo check --all-features
2524
2625tests : # # Run the tests
27- cargo test -- --show-output
28- # cargo test -- -Z unstable-options --format json | cargo2junit > junit.xml
29-
30- tests-ci : $(eval SHELL:=/bin/bash)
31- { \
32- export CARGO_INCREMENTAL=0; \
33- export RUSTDOCFLAGS=" -Cpanic=abort" ; \
34- export RUSTFLAGS=" -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" ; \
35- cargo test -- -Z unstable-options --format json | cargo2junit > junit.xml; \
36- grcov . --llvm -s . -t cobertura --branch --ignore-not-existing -o ./coverage.xml; \
37- }
38-
26+ cargo llvm-cov nextest --cobertura --output-path junit.xml
3927
28+ coverage :
29+ cargo llvm-cov nextest --lcov --output-path coverage
4030
4131# aliases
4232develop : dev
Original file line number Diff line number Diff line change 11// pub use transports_core::*;
2+ #[ cfg( test) ]
3+ mod tests {
4+ #[ test]
5+ fn test_test ( ) {
6+ assert_eq ! ( 1 , 1 ) ;
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments