@@ -42,94 +42,20 @@ jobs:
4242 with :
4343 tool : grcov
4444
45- - name : Build crate
46- run : cargo build --verbose --all-targets
47- env :
48- RUSTFLAGS : " -Cinstrument-coverage"
49-
50- - name : Test crate
45+ - name : run tests
5146 run : cargo test --workspace --verbose
5247 env :
53- LLVM_PROFILE_FILE : " target/coverage/prof/ %p-%m.profraw"
48+ LLVM_PROFILE_FILE : " target/coverage/%p-%m.profraw"
5449 RUSTFLAGS : " -Cinstrument-coverage"
5550
56- - name : Create coverage report for core
57- run : |
58- grcov \
59- --source-dir . \
60- --binary-path target/debug \
61- --branch \
62- --excl-start 'mod tests \{' \
63- --ignore 'tests/*' \
64- -t lcov \
65- -o lcov_core.info \
66- crates/bcr-ebill-core/target/coverage/prof
67-
68- - name : Upload coverage to Codecov for core
69- uses : codecov/codecov-action@v4
70- env :
71- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
72- with :
73- files : lcov_core.info
74- fail_ci_if_error : false
75-
76- - name : Create coverage report for persistence
77- run : |
78- grcov \
79- --source-dir . \
80- --binary-path target/debug \
81- --branch \
82- --excl-start 'mod tests \{' \
83- --ignore 'tests/*' \
84- -t lcov \
85- -o lcov_persistence.info \
86- crates/bcr-ebill-persistence/target/coverage/prof
87-
88- - name : Upload coverage to Codecov for persistence
89- uses : codecov/codecov-action@v4
90- env :
91- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
92- with :
93- files : lcov_persistence.info
94- fail_ci_if_error : false
95-
96-
97- - name : Create coverage report for api
98- run : |
99- grcov \
100- --source-dir . \
101- --binary-path target/debug \
102- --branch \
103- --excl-start 'mod tests \{' \
104- --ignore 'tests/*' \
105- -t lcov \
106- -o lcov_api.info \
107- crates/bcr-ebill-api/target/coverage/prof
108-
109- - name : Upload coverage to Codecov for API
110- uses : codecov/codecov-action@v4
111- env :
112- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
113- with :
114- files : lcov_api.info
115- fail_ci_if_error : false
116-
117- - name : Create coverage report for web
118- run : |
119- grcov \
120- --source-dir . \
121- --binary-path target/debug \
122- --branch \
123- --excl-start 'mod tests \{' \
124- --ignore 'tests/*' \
125- -t lcov \
126- -o lcov_web.info \
127- crates/bcr-ebill-web/target/coverage/prof
51+ - name : Create coverage report
52+ run : grcov --source-dir . --binary-path target/debug --branch --excl-start 'mod tests \{' --ignore 'tests/*' --keep-only "crates/*" -o lcov.info -t lcov `find crates -name coverage`
12853
12954 - name : Upload coverage to Codecov
13055 uses : codecov/codecov-action@v4
13156 env :
13257 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
13358 with :
134- files : lcov_web .info
59+ files : lcov .info
13560 fail_ci_if_error : false
61+
0 commit comments