Skip to content

Commit ee50d22

Browse files
authored
Merge pull request #26 from timkpaine/dependabot/github_actions/codecov/codecov-action-5
Bump codecov/codecov-action from 4 to 5
2 parents 061f349 + 4e9995d commit ee50d22

File tree

6 files changed

+30
-26
lines changed

6 files changed

+30
-26
lines changed

.config/nextest.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[profile.default.junit]
2+
path = "junit.xml"

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
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

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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

44
develop-py:
55
make -C python develop
@@ -68,10 +68,13 @@ tests-rust:
6868
tests: tests-rust tests-js tests-py ## Run the tests
6969
test: 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
7780
help:

python/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ fix: ## run autofixers
3232
format: fix
3333

3434
tests: ## 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

3737
test: 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+
3943
checks: ## run checks
4044
# python -m check_manifest
4145

rust/Makefile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
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

44
dev: ## 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

1312
build: ## Build release
1413
cargo build --release --all-features
@@ -24,19 +23,10 @@ check:
2423
cargo check --all-features
2524

2625
tests: ## 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
4232
develop: dev

rust/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
// pub use transports_core::*;
2+
#[cfg(test)]
3+
mod tests {
4+
#[test]
5+
fn test_test() {
6+
assert_eq!(1, 1);
7+
}
8+
}

0 commit comments

Comments
 (0)