-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #139: chore: set rust edition to 2021, fix clippy, add ci fmt a…
…nd clippy checks 0dd5140 chore(ci): add fmt and clippy checks (Steve Myers) e7af332 chore: fix clippy errors and set msrv to 1.63 (Steve Myers) 84f4f60 chore: set rust edition to 2021 (Steve Myers) Pull request description: A little house keeping to avoid the warning about missing the edition. After setting the rust edition to 2021 I had to fix clippy warnings. I also added CI fmt and clippy checks. ACKs for top commit: ValuedMammal: ACK 0dd5140 oleonardolima: ACK 0dd5140 Tree-SHA512: ee37c3ef06e217f76dcb622cdbb53e9b5c94163b789ca584037d5a8bb4bdef13c6cf251b555ac0e0ede309d7436295f1ede4e2ac6c0dc141c9bf2e3d6ecf9238
- Loading branch information
Showing
11 changed files
with
76 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,19 @@ on: [push, pull_request] | |
name: CI | ||
|
||
jobs: | ||
test-fmt: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-20.04 | ||
env: | ||
TEST_ELECTRUM_SERVER: electrum.blockstream.info:50001 | ||
#TEST_ELECTRUM_SERVER: bitcoin.aranguren.org:50001 | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable # STABLE | ||
- 1.63.0 # MSRV | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
|
@@ -25,14 +24,10 @@ jobs: | |
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | ||
- name: Install rustup | ||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
- name: Set default toolchain | ||
run: $HOME/.cargo/bin/rustup default ${{ matrix.rust }} | ||
- name: Set profile | ||
run: $HOME/.cargo/bin/rustup set profile minimal | ||
- name: Fmt | ||
run: cargo fmt -- --check --verbose | ||
- name: Install rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- name: Test | ||
run: cargo test --verbose --all-features | ||
- name: Setup iptables for the timeout test | ||
|
@@ -46,3 +41,32 @@ jobs: | |
- run: cargo check --verbose --no-default-features --features=proxy,use-openssl | ||
- run: cargo check --verbose --no-default-features --features=proxy,use-rustls | ||
- run: cargo check --verbose --no-default-features --features=proxy,use-rustls-ring | ||
|
||
fmt: | ||
name: Rust fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
- name: Check fmt | ||
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: 1.78.0 | ||
components: clippy | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv="1.63.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.