From 84a127a224ed648cf3d5bc5fcecb096bc373785f Mon Sep 17 00:00:00 2001 From: Mykhailo Donchenko <91957742+Buckram123@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:36:20 +0300 Subject: [PATCH] Disable nightly+beta CI (#457) * disable nightly+beta ci * fix clippy * remove scheduled.yml --- .github/workflows/scheduled.yml | 48 ------------------- .github/workflows/test.yml | 4 +- cw-orch-daemon/src/channel.rs | 1 + cw-orch-daemon/tests/tx_resp.rs | 4 +- packages/clone-testing/src/core.rs | 4 +- .../src/environment/index_response.rs | 2 +- packages/cw-orch-mock/src/core.rs | 6 +-- 7 files changed, 12 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/scheduled.yml diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml deleted file mode 100644 index 743fcd861..000000000 --- a/.github/workflows/scheduled.yml +++ /dev/null @@ -1,48 +0,0 @@ -permissions: - contents: read -on: - push: - branches: [main] - pull_request: - schedule: - - cron: '7 7 * * *' -name: rolling -jobs: - # https://twitter.com/mycoliza/status/1571295690063753218 - nightly: - runs-on: ubuntu-latest - name: ubuntu / nightly - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Install nightly - uses: dtolnay/rust-toolchain@nightly - - name: cargo generate-lockfile - if: hashFiles('Cargo.lock') == '' - run: cargo generate-lockfile - - name: cargo test --locked - run: cargo test --locked --all-features --all-targets - # https://twitter.com/alcuadrado/status/1571291687837732873 - update: - runs-on: ubuntu-latest - name: ubuntu / beta / updated - # There's no point running this if no Cargo.lock was checked in in the - # first place, since we'd just redo what happened in the regular test job. - # Unfortunately, hashFiles only works in if on steps, so we reepeat it. - # if: hashFiles('Cargo.lock') != '' - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Install beta - if: hashFiles('Cargo.lock') != '' - uses: dtolnay/rust-toolchain@beta - - name: cargo update - if: hashFiles('Cargo.lock') != '' - run: cargo update - - name: cargo test - if: hashFiles('Cargo.lock') != '' - run: cargo test --locked --all-features --all-targets - env: - RUSTFLAGS: -D deprecated diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36186928d..2925b5cd2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,9 @@ jobs: name: ubuntu / ${{ matrix.toolchain }} strategy: matrix: - toolchain: [stable, beta] + toolchain: [ + stable, # beta failing to some crate using multiple `thread::set_current` + ] fail-fast: false # beta may fail we shouldn't care steps: - uses: actions/checkout@v4 diff --git a/cw-orch-daemon/src/channel.rs b/cw-orch-daemon/src/channel.rs index 5a3837ff0..dd0c52633 100644 --- a/cw-orch-daemon/src/channel.rs +++ b/cw-orch-daemon/src/channel.rs @@ -133,6 +133,7 @@ mod tests { chain.grpc_urls = grpcs; let build_res = DaemonAsync::builder(chain) + .is_test(true) .deployment_id("v0.1.0") .build_sender(()) .await; diff --git a/cw-orch-daemon/tests/tx_resp.rs b/cw-orch-daemon/tests/tx_resp.rs index 6015ec44f..1d8d7fffb 100644 --- a/cw-orch-daemon/tests/tx_resp.rs +++ b/cw-orch-daemon/tests/tx_resp.rs @@ -144,12 +144,12 @@ fn test_timestamp() { let ts_time = timestamp.time(); asserting!("timestamp time is equal to dataset timestamp") .that(&ts_time.to_string()) - .is_equal_to(&String::from("00:27:04")); + .is_equal_to(String::from("00:27:04")); let ts_date = timestamp.date_naive(); asserting!("timestamp date is equal to dataset timestamp") .that(&ts_date.to_string()) - .is_equal_to(&String::from("2023-04-07")); + .is_equal_to(String::from("2023-04-07")); } #[test] diff --git a/packages/clone-testing/src/core.rs b/packages/clone-testing/src/core.rs index 3e6d2b64a..37cda10a9 100644 --- a/packages/clone-testing/src/core.rs +++ b/packages/clone-testing/src/core.rs @@ -573,7 +573,7 @@ mod test { let code_id = (1 + LOCAL_RUST_CODE_OFFSET) as u64; asserting("contract initialized properly") .that(&init_res.events[0].attributes[0].value) - .is_equal_to(&code_id.to_string()); + .is_equal_to(code_id.to_string()); let init_msg = cw20_base::msg::InstantiateMsg { name: String::from("Token"), @@ -605,7 +605,7 @@ mod test { asserting("that exect passed on correctly") .that(&exec_res.events[1].attributes[1].value) - .is_equal_to(&String::from("mint")); + .is_equal_to(String::from("mint")); let query_res = chain .query::( diff --git a/packages/cw-orch-core/src/environment/index_response.rs b/packages/cw-orch-core/src/environment/index_response.rs index 4b649354f..13c4431aa 100644 --- a/packages/cw-orch-core/src/environment/index_response.rs +++ b/packages/cw-orch-core/src/environment/index_response.rs @@ -152,7 +152,7 @@ mod index_response_test { fn test_instantiated_contract_address(idxres: &dyn IndexResponse) -> anyhow::Result<()> { asserting!("instantiated contract_address is ") .that(&idxres.instantiated_contract_address()?) - .is_equal_to(&Addr::unchecked(CONTRACT_ADDRESS)); + .is_equal_to(Addr::unchecked(CONTRACT_ADDRESS)); Ok(()) } diff --git a/packages/cw-orch-mock/src/core.rs b/packages/cw-orch-mock/src/core.rs index bc3f066a7..18d582645 100644 --- a/packages/cw-orch-mock/src/core.rs +++ b/packages/cw-orch-mock/src/core.rs @@ -322,7 +322,7 @@ mod test { let init_res = chain.upload_custom("cw20", contract_source).unwrap(); asserting("contract initialized properly") .that(&init_res.events[0].attributes[0].value) - .is_equal_to(&String::from("1")); + .is_equal_to(String::from("1")); let init_msg = cw20_base::msg::InstantiateMsg { name: String::from("Token"), @@ -351,7 +351,7 @@ mod test { asserting("that exect passed on correctly") .that(&exec_res.events[1].attributes[1].value) - .is_equal_to(&String::from("mint")); + .is_equal_to(String::from("mint")); let query_res = chain .query::( @@ -364,7 +364,7 @@ mod test { asserting("that query passed on correctly") .that(&query_res.attributes[1].value) - .is_equal_to(&String::from("0")); + .is_equal_to(String::from("0")); let migration_res = chain.migrate(&cw20_base::msg::MigrateMsg {}, 1, &contract_address); asserting("that migration passed on correctly")