-
Notifications
You must be signed in to change notification settings - Fork 30
tests: Add sysctl ipv6 and extra CI steps #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
32ea0ca
tests: Switch to ipv4 localhost
lexnv 1e16a28
crypto/noise/tests: Bind to ipv4 int
lexnv 8c6f88e
ci: Enable ipv6 support
lexnv cb7b070
Update .github/workflows/ci.yml
lexnv 7e75ae5
Try sending response filled with zeros instead of generating random data
dmitry-markin ba8fb1c
Use `XorShiftRng` to generate non-zero payload
dmitry-markin 62ac4cc
Revert "crypto/noise/tests: Bind to ipv4 int"
lexnv df37f98
Revert "tests: Switch to ipv4 localhost"
lexnv cd006c2
ci: Add cargo fmt step
lexnv 6cbfa0c
ci: Add cargo machete for unused dependencies
lexnv 666dea4
ci: Add extra steps for ci
lexnv 84bd317
ci: Cancel the CI on first failure
lexnv ff6574b
ci: Reduce timeout to 15 mins
lexnv 445ff70
ci: Use nightly for cargo fmt
lexnv 95d17dd
ci: Enfore better cargo doc rules
lexnv 45b213e
Fix cargo doc
lexnv 0663add
cargo: Remove unused dependency
lexnv 8b91e3d
rusfmt: Add `reorder_imports`
lexnv 32ee6c5
Change import order
lexnv c3dd665
ci: Allow clippy to fail for now
lexnv d5e2f40
ci: Continue on clippy error
lexnv 64bb680
ci: Check fmt nightly
lexnv a0dff2f
Update .github/workflows/ci.yml
lexnv 994fb98
ci: Don't cancel the CI on step failure
lexnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -12,98 +12,118 @@ concurrency: | |
| # ${{ vars.CI_UNIFIED_IMAGE }} is defined in the repository variables | ||
|
|
||
| jobs: | ||
| check: | ||
| name: "check" | ||
| fmt: | ||
| name: Cargo fmt | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ vars.CI_IMAGE }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # uncomment if needed | ||
| # - name: fmt | ||
| # run: | | ||
| # cargo fmt --all --check | ||
|
|
||
| - name: Rust Cache | ||
| uses: Swatinem/rust-cache@v2.5.0 | ||
| uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | ||
| with: | ||
| cache-on-failure: true | ||
| cache-all-crates: true | ||
|
|
||
| - name: check | ||
| run: cargo check | ||
| - name: Cargo fmt | ||
| run: cargo +nightly fmt --all -- --check | ||
|
|
||
| test: | ||
| name: "test" | ||
| machete: | ||
| name: Check unused dependencies | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ vars.CI_IMAGE }} | ||
| # options: --privileged | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Rust Cache | ||
| uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | ||
| with: | ||
| cache-on-failure: true | ||
| cache-all-crates: true | ||
|
|
||
| - name: Install cargo-machete | ||
| run: cargo install cargo-machete | ||
|
|
||
| # - name: Install Rust stable toolchain | ||
| # uses: actions-rs/[email protected] | ||
| # with: | ||
| # profile: minimal | ||
| # toolchain: 1.75.0 | ||
| # override: true | ||
| - name: Check unused dependencies | ||
| run: cargo machete | ||
|
|
||
| check: | ||
| name: Cargo check | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ vars.CI_IMAGE }} | ||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Rust Cache | ||
| uses: Swatinem/rust-cache@v2.5.0 | ||
| uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | ||
| with: | ||
| cache-on-failure: true | ||
| cache-all-crates: true | ||
|
|
||
| - name: test | ||
| run: | | ||
| # sudo apt-get update && sudo apt-get install -y iproute2 protobuf-compiler | ||
| echo "Installing iproute2..." | ||
| apt-get update && apt-get install -y iproute2 iputils-ping | ||
| # ip a | ||
| # echo "Enabling loopback interface explicitly..." | ||
| # ip link set lo up | ||
| echo "Result" | ||
| ip a | ||
| ping -c 1 127.0.0.1 | ||
| echo "Starting a simple HTTP server..." | ||
| python3 -m http.server --bind 127.0.0.1 8080 & | ||
| sleep 1 | ||
| curl 127.0.0.1:8080 | ||
| echo "Running tests..." | ||
| cargo test | ||
| - name: Cargo check | ||
| run: cargo check | ||
|
|
||
| doc: | ||
| name: "doc" | ||
| name: Check documentation | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ vars.CI_IMAGE }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Rust Cache | ||
| uses: Swatinem/rust-cache@v2.5.0 | ||
| uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | ||
| with: | ||
| cache-on-failure: true | ||
| cache-all-crates: true | ||
| - name: doc | ||
| run: cargo doc | ||
| - name: Check documentation | ||
| run: RUSTDOCFLAGS="-D warnings -D rustdoc::broken_intra_doc_links" cargo doc --workspace --no-deps --document-private-items | ||
dmitry-markin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| clippy: | ||
| name: "clippy" | ||
| name: Cargo clippy | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ vars.CI_IMAGE }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Rust Cache | ||
| uses: Swatinem/rust-cache@v2.5.0 | ||
| uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | ||
| with: | ||
| cache-on-failure: true | ||
| cache-all-crates: true | ||
|
|
||
| - name: clippy | ||
| # TODO: Allow clippy to fail and do not cancel other tasks. | ||
| # Clippy is fixed by: https://github.com/paritytech/litep2p/pull/57. | ||
| - name: Run clippy | ||
| continue-on-error: true | ||
| run: cargo clippy | ||
|
|
||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| container: | ||
| image: ${{ vars.CI_IMAGE }} | ||
| options: --sysctl net.ipv6.conf.all.disable_ipv6=0 | ||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Rust Cache | ||
| uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | ||
| with: | ||
| cache-on-failure: true | ||
| cache-all-crates: true | ||
|
|
||
| - name: Run tests | ||
| run: cargo test | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,9 +1,20 @@ | ||
| # Basic | ||
| edition = "2021" | ||
| max_width = 100 | ||
|
|
||
| # Imports | ||
| imports_granularity = "Crate" | ||
| reorder_imports = true | ||
|
|
||
| # Consistency | ||
| newline_style = "Unix" | ||
|
|
||
| # Misc | ||
| chain_width = 80 | ||
| spaces_around_ranges = false | ||
| match_arm_blocks = false | ||
| trailing_comma = "Vertical" | ||
| edition = "2021" | ||
|
|
||
| # Format comments | ||
| comment_width = 100 | ||
| wrap_comments = true |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.