From e963199ab10b28b5406eb47ba7503b3170f6b099 Mon Sep 17 00:00:00 2001 From: Victor Yves Crispim Date: Wed, 25 Oct 2023 13:58:27 -0300 Subject: [PATCH 1/2] feat: set rust toolchain version to 1.72 Rust version 1.73.0 introduced new warnings, and made some dispatcher tests start failing. Pining the Rust version will allow the CI checks to pass and postpone the need to update the Rust codebase. --- .github/workflows/rust-code-quality.yml | 13 ++++++++----- offchain/rust-toolchain.toml | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 offchain/rust-toolchain.toml diff --git a/.github/workflows/rust-code-quality.yml b/.github/workflows/rust-code-quality.yml index 6f9d843cd..37081d2a0 100644 --- a/.github/workflows/rust-code-quality.yml +++ b/.github/workflows/rust-code-quality.yml @@ -4,8 +4,8 @@ name: Assess Rust code quality on: push: paths: - - '.github/workflows/rust-code-quality.yml' - - 'offchain/**' + - ".github/workflows/rust-code-quality.yml" + - "offchain/**" jobs: assess-rust-code-quality: @@ -33,9 +33,6 @@ jobs: - name: Install protoc run: sudo apt update && sudo apt install -y protobuf-compiler libprotobuf-dev - - name: Update rust - run: rustup update - - name: Install cargo-machete run: cargo install cargo-machete continue-on-error: true @@ -43,8 +40,14 @@ jobs: - name: Analyze dependencies run: cargo machete . + - name: Install rustfmt + run: rustup component add rustfmt + - name: Check code format run: cargo fmt --all -- --check + - name: Install clippy + run: rustup component add clippy + - name: Run linter run: cargo clippy -- -A clippy::module_inception diff --git a/offchain/rust-toolchain.toml b/offchain/rust-toolchain.toml new file mode 100644 index 000000000..7e8f0a9aa --- /dev/null +++ b/offchain/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.72" From 2e7dd4944ac482db52888db665881d431c9f7274 Mon Sep 17 00:00:00 2001 From: Victor Yves Crispim Date: Tue, 24 Oct 2023 15:28:02 -0300 Subject: [PATCH 2/2] ci: adjust dependabot settings Modifies dependabot settings so its PRs pass the CI checks automatically --- .github/dependabot.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6603a59da..b864c48ca 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,6 +6,8 @@ updates: schedule: interval: "weekly" commit-message: - prefix: "dependabot" + prefix: "ci" pull-request-branch-name: separator: "/" + labels: + - "no changelog"