Skip to content

Commit 83a2477

Browse files
committed
Disable scarb 2.10.0 specific tests
Closes #3096 commit-id:3ae67c8b
1 parent 7e1ab98 commit 83a2477

File tree

7 files changed

+18
-73
lines changed

7 files changed

+18
-73
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ jobs:
2323
- uses: software-mansion/setup-scarb@v1
2424
- uses: software-mansion/setup-universal-sierra-compiler@v1
2525
- run: cargo test --release --lib -p forge
26-
# TODO(#3096): Remove running tests with `scarb_since_2_10`
27-
- uses: software-mansion/setup-scarb@v1
28-
with:
29-
scarb-version: "2.10.1"
30-
- name: Check and lint forge templates
31-
run: cargo test --release -p forge --features scarb_since_2_10 validate_templates
32-
- name: Check and lint snforge_std
33-
run: cargo test --release -p forge --features scarb_since_2_10 validate_snforge_std
3426

3527
build-test-forge-nextest-archive:
3628
runs-on: ubuntu-latest
@@ -144,21 +136,6 @@ jobs:
144136
- run: cargo test --package forge --features scarb_2_9_1 --lib compatibility_check::tests::warning_requirements
145137
- run: cargo test --package forge --features scarb_2_9_1 --test main e2e::running::sierra_gas_with_older_scarb
146138

147-
# todo(3096): Remove this and the feature as soon as scarb 2.10 is the oldest officially supported version
148-
test-scarb-since-2-10:
149-
name: Test scarb 2.10
150-
runs-on: ubuntu-latest
151-
steps:
152-
- uses: actions/checkout@v4
153-
- uses: dtolnay/rust-toolchain@stable
154-
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
155-
- uses: software-mansion/setup-scarb@v1
156-
with:
157-
scarb-version: "2.10.1"
158-
- uses: software-mansion/setup-universal-sierra-compiler@v1
159-
160-
- run: cargo test --package forge --features scarb_since_2_10 sierra_gas
161-
162139
# TODO(#3212): Closures in Cairo are fully supported since version 2.11
163140
test-interact-with-state:
164141
name: Test interact with state
@@ -168,8 +145,6 @@ jobs:
168145
- uses: dtolnay/rust-toolchain@stable
169146
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
170147
- uses: software-mansion/setup-scarb@v1
171-
with:
172-
scarb-version: "2.11.0"
173148
- uses: software-mansion/setup-universal-sierra-compiler@v1
174149

175150
- run: cargo test --release --package forge --features interact-with-state --test main integration::interact_with_state
@@ -259,12 +234,6 @@ jobs:
259234
- uses: software-mansion/setup-universal-sierra-compiler@v1
260235
- name: Run tests
261236
run: cargo test --release -p sncast
262-
# TODO(#3096): Remove running tests with `scarb_since_2_10`
263-
- uses: software-mansion/setup-scarb@v1
264-
with:
265-
scarb-version: "2.10.1"
266-
- name: Check and lint sncast_std
267-
run: cargo test --release -p sncast --features scarb_since_2_10 validate_sncast_std
268237

269238
test-conversions:
270239
name: Test Conversions

crates/forge/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ edition.workspace = true
88
[features]
99
smoke = []
1010
scarb_2_9_1 = []
11-
scarb_since_2_10 = []
1211
no_scarb_installed = []
1312
debugging = []
1413
assert_non_exact_gas = ["test_utils/assert_non_exact_gas"]

crates/forge/tests/e2e/running.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,6 @@ fn detailed_resources_flag() {
10061006
}
10071007

10081008
#[test]
1009-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
10101009
fn detailed_resources_flag_sierra_gas() {
10111010
let temp = setup_package("erc20_package");
10121011
let output = test_runner(&temp)
@@ -1036,7 +1035,6 @@ fn detailed_resources_flag_sierra_gas() {
10361035
}
10371036

10381037
#[test]
1039-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
10401038
fn detailed_resources_mixed_resources() {
10411039
let temp = setup_package("forking");
10421040
let output = test_runner(&temp)

crates/forge/tests/integration/gas.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,6 @@ fn nested_call_cost_in_forked_contract_cairo_steps() {
11531153
}
11541154

11551155
#[test]
1156-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
11571156
fn declare_cost_is_omitted_sierra_gas() {
11581157
let test = test_case!(
11591158
indoc!(
@@ -1189,7 +1188,6 @@ fn declare_cost_is_omitted_sierra_gas() {
11891188
}
11901189

11911190
#[test]
1192-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
11931191
fn deploy_syscall_cost_sierra_gas() {
11941192
let test = test_case!(
11951193
indoc!(
@@ -1238,7 +1236,6 @@ fn deploy_syscall_cost_sierra_gas() {
12381236
}
12391237

12401238
#[test]
1241-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
12421239
fn snforge_std_deploy_cost_sierra_gas() {
12431240
let test = test_case!(
12441241
indoc!(
@@ -1279,7 +1276,6 @@ fn snforge_std_deploy_cost_sierra_gas() {
12791276
}
12801277

12811278
#[test]
1282-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
12831279
fn keccak_cost_sierra_gas() {
12841280
let test = test_case!(indoc!(
12851281
r"
@@ -1309,7 +1305,6 @@ fn keccak_cost_sierra_gas() {
13091305
}
13101306

13111307
#[test]
1312-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
13131308
fn contract_keccak_cost_sierra_gas() {
13141309
let test = test_case!(
13151310
indoc!(
@@ -1359,7 +1354,6 @@ fn contract_keccak_cost_sierra_gas() {
13591354
}
13601355

13611356
#[test]
1362-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
13631357
fn contract_range_check_cost_sierra_gas() {
13641358
let test = test_case!(
13651359
indoc!(
@@ -1405,7 +1399,6 @@ fn contract_range_check_cost_sierra_gas() {
14051399
}
14061400

14071401
#[test]
1408-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
14091402
fn storage_write_cost_sierra_gas() {
14101403
let test = test_case!(
14111404
indoc!(
@@ -1457,7 +1450,6 @@ fn storage_write_cost_sierra_gas() {
14571450
}
14581451

14591452
#[test]
1460-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
14611453
fn multiple_storage_writes_cost_sierra_gas() {
14621454
let test = test_case!(
14631455
indoc!(
@@ -1516,7 +1508,6 @@ fn multiple_storage_writes_cost_sierra_gas() {
15161508
}
15171509

15181510
#[test]
1519-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
15201511
fn l1_message_cost_sierra_gas() {
15211512
let test = test_case!(
15221513
indoc!(
@@ -1567,7 +1558,6 @@ fn l1_message_cost_sierra_gas() {
15671558
}
15681559

15691560
#[test]
1570-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
15711561
fn l1_message_cost_for_proxy_sierra_gas() {
15721562
let test = test_case!(
15731563
indoc!(
@@ -1632,7 +1622,6 @@ fn l1_message_cost_for_proxy_sierra_gas() {
16321622
}
16331623

16341624
#[test]
1635-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
16361625
fn events_cost_sierra_gas() {
16371626
let test = test_case!(indoc!(
16381627
r"
@@ -1679,7 +1668,6 @@ fn events_cost_sierra_gas() {
16791668
}
16801669

16811670
#[test]
1682-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
16831671
fn events_contract_cost_sierra_gas() {
16841672
let test = test_case!(
16851673
indoc!(
@@ -1726,7 +1714,6 @@ fn events_contract_cost_sierra_gas() {
17261714
}
17271715

17281716
#[test]
1729-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
17301717
fn nested_call_cost_sierra_gas() {
17311718
let test = test_case!(
17321719
indoc!(
@@ -1796,7 +1783,6 @@ fn nested_call_cost_sierra_gas() {
17961783
}
17971784

17981785
#[test]
1799-
#[cfg_attr(not(feature = "scarb_since_2_10"), ignore)]
18001786
fn nested_call_cost_in_forked_contract_sierra_gas() {
18011787
let test = test_case!(
18021788
formatdoc!(

crates/sncast/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ packages_validation = { path = "../testing/packages_validation" }
7373

7474
[features]
7575
default = []
76-
scarb_since_2_10 = ["packages_validation/scarb_since_2_10"]
7776

7877
[[bin]]
7978
name = "sncast"

crates/testing/packages_validation/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ project-root.workspace = true
1212

1313
[dev-dependencies]
1414
test-case.workspace = true
15-
16-
[features]
17-
scarb_since_2_10 = []

crates/testing/packages_validation/src/lib.rs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,23 @@ pub fn check_and_lint(package_path: &Utf8PathBuf) {
1616
"`scarb check` failed in {package_path}",
1717
);
1818

19-
// TODO(#3149)
20-
if cfg!(feature = "scarb_since_2_10") {
21-
let lint_output = ScarbCommand::new()
22-
.current_dir(package_path)
23-
.arg("lint")
24-
.command()
25-
.stdout(Stdio::inherit())
26-
.stderr(Stdio::inherit())
27-
.output()
28-
.expect("Failed to run `scarb lint`");
29-
assert!(
30-
lint_output.status.success(),
31-
"`scarb lint` failed in {package_path}"
32-
);
19+
let lint_output = ScarbCommand::new()
20+
.current_dir(package_path)
21+
.arg("lint")
22+
.command()
23+
.stdout(Stdio::inherit())
24+
.stderr(Stdio::inherit())
25+
.output()
26+
.expect("Failed to run `scarb lint`");
27+
assert!(
28+
lint_output.status.success(),
29+
"`scarb lint` failed in {package_path}"
30+
);
3331

34-
// TODO(#3212): Once out minimal supported scarb version is 2.12.0, we should
35-
// check status instead of checking if stdout is not empty
36-
assert!(
37-
lint_output.stdout.is_empty(),
38-
"`scarb lint` output should be empty"
39-
);
40-
}
32+
// TODO(#3212): Once out minimal supported scarb version is 2.12.0, we should
33+
// check status instead of checking if stdout is not empty
34+
assert!(
35+
lint_output.stdout.is_empty(),
36+
"`scarb lint` output should be empty"
37+
);
4138
}

0 commit comments

Comments
 (0)