From e59235ee5540460440b5e590761227b5325ce759 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Mon, 29 Apr 2024 12:34:22 +0800 Subject: [PATCH] ci: allow some nightly lints (#582) --- .github/workflows/lint.yaml | 14 +++++++++++--- starknet-contract/tests/contract_deployment.rs | 2 +- starknet-crypto/src/test_utils.rs | 2 -- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 408335a3..1a8df083 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -78,11 +78,19 @@ jobs: components: "clippy" override: true + - name: "Set allowed lints" + run: | + if [ "${{ matrix.toolchain }}" == "nightly" ]; then + echo "ALLOWED=-A non_local_definitions" >> $GITHUB_ENV + else + echo "ALLOWED=" >> $GITHUB_ENV + fi + - name: "Run Clippy (default)" run: | - cargo clippy --all --all-targets -- -D warnings + cargo clippy --all --all-targets -- -D warnings $ALLOWED - name: "Run Clippy (no_std)" run: | - cargo clippy --package starknet-crypto --no-default-features -- -D warnings - cargo clippy --package starknet-crypto --no-default-features --features alloc -- -D warnings + cargo clippy --package starknet-crypto --no-default-features -- -D warnings $ALLOWED + cargo clippy --package starknet-crypto --no-default-features --features alloc -- -D warnings $ALLOWED diff --git a/starknet-contract/tests/contract_deployment.rs b/starknet-contract/tests/contract_deployment.rs index f27d227a..d0f522e1 100644 --- a/starknet-contract/tests/contract_deployment.rs +++ b/starknet-contract/tests/contract_deployment.rs @@ -52,7 +52,7 @@ async fn can_deploy_contract_to_alpha_sepolia() { FieldElement::from_bytes_be(&salt_buffer).unwrap(), true, ) - .max_fee(FieldElement::from_dec_str("1000000000000000000").unwrap()) + .max_fee(FieldElement::from_dec_str("100000000000000000").unwrap()) .send() .await; diff --git a/starknet-crypto/src/test_utils.rs b/starknet-crypto/src/test_utils.rs index 83f587f7..cbe0f8ef 100644 --- a/starknet-crypto/src/test_utils.rs +++ b/starknet-crypto/src/test_utils.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - use crate::FieldElement; pub fn field_element_from_be_hex(hex: &str) -> FieldElement {