Skip to content

Commit e38f1ae

Browse files
committed
Run on all scarb versions
commit-id:e34769de
1 parent f1fd1b4 commit e38f1ae

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
version: [ 2.9.4, 2.10.1, 2.11.4 ]
15+
version: [ 2.9.4, 2.10.1, 2.11.4, 2.12.2, 2.13.1 ]
1616
steps:
1717
- uses: actions/checkout@v5
1818
- uses: dtolnay/rust-toolchain@stable
@@ -26,6 +26,8 @@ jobs:
2626
if: matrix.version == '2.9.4' || matrix.version == '2.10.1'
2727
- run: cargo test --release --features allows-excluding-macros
2828
if: matrix.version == '2.11.4'
29+
- run: cargo test --release --features allows-excluding-macros,scarb-12-and-above
30+
if: matrix.version == '2.12.2' || matrix.version == '2.13.1'
2931

3032
rustfmt:
3133
name: Check rust formatting

crates/cairo-coverage/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ snapbox.workspace = true
2121

2222
[features]
2323
allows-excluding-macros = []
24+
scarb-12-and-above = []

crates/cairo-coverage/tests/e2e/general.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ fn scarb_template() {
3131
fn complex_calculator() {
3232
TestProject::new("complex_calculator")
3333
.run()
34-
.output_same_as_in_file("complex_calculator.lcov");
34+
.output_same_as_in_file(if cfg!(feature = "scarb-12-and-above") {
35+
"complex_calculator_scarb_12.lcov"
36+
} else {
37+
"complex_calculator.lcov"
38+
});
3539
}
3640

3741
#[test]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
TN:
2+
SF:{dir}/src/lib.cairo
3+
FN:2,complex_calculator::add
4+
FNDA:1,complex_calculator::add
5+
FN:18,complex_calculator::divide
6+
FNDA:1,complex_calculator::divide
7+
FN:28,complex_calculator::factorial
8+
FNDA:1,complex_calculator::factorial
9+
FN:45,complex_calculator::fibonacci
10+
FNDA:1,complex_calculator::fibonacci
11+
FN:54,complex_calculator::is_prime
12+
FNDA:1,complex_calculator::is_prime
13+
FN:10,complex_calculator::multiply
14+
FNDA:1,complex_calculator::multiply
15+
FN:38,complex_calculator::power
16+
FNDA:1,complex_calculator::power
17+
FN:6,complex_calculator::subtract
18+
FNDA:1,complex_calculator::subtract
19+
FN:14,complex_calculator::unsafe_divide
20+
FNDA:0,complex_calculator::unsafe_divide
21+
FNF:9
22+
FNH:8
23+
DA:2,1
24+
DA:6,1
25+
DA:10,1
26+
DA:14,0
27+
DA:18,1
28+
DA:21,0
29+
DA:28,1
30+
DA:29,1
31+
DA:30,1
32+
DA:38,1
33+
DA:39,1
34+
DA:40,1
35+
DA:45,1
36+
DA:46,0
37+
DA:47,1
38+
DA:48,1
39+
DA:49,0
40+
DA:54,1
41+
DA:59,1
42+
DA:60,1
43+
DA:63,1
44+
LF:21
45+
LH:17
46+
end_of_record

0 commit comments

Comments
 (0)