-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from EspressoSystems/nm/move-test
Move libp2p networking code to this repository
- Loading branch information
Showing
36 changed files
with
7,408 additions
and
360 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output-type: lcov | ||
ignore: | ||
- "/*" | ||
- "../*" | ||
- "target/*" |
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,55 @@ | ||
name: Build (libp2p-networking) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Outdated Builds | ||
uses: styfle/[email protected] | ||
with: | ||
all_but_latest: true | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: stable | ||
override: true | ||
default: true | ||
components: rustfmt, clippy | ||
|
||
- name: Enable Rust Caching | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ github.token }} | ||
args: --manifest-path libp2p-networking/Cargo.toml | ||
|
||
# Does not work with a nested dir | ||
# - name: Audit | ||
# uses: actions-rs/audit-check@v1 | ||
# with: | ||
# token: ${{ github.token }} | ||
|
||
- name: Cargo Build | ||
run: cargo build --release --manifest-path libp2p-networking/Cargo.toml | ||
|
||
- name: Cargo Test | ||
run: cargo test --verbose --release test_stress --manifest-path libp2p-networking/Cargo.toml -- -Zunstable-options --report-time --test-threads=1 |
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,53 @@ | ||
name: Code Coverage (libp2p-newtorking) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
code-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust Nightly Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Run Cargo Test With Coverage Options | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast test_coverage -- --test-threads=1 | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
|
||
# TODO: Seems like we can't override the path where grcov runs, so we're currently code coveraging the main repo | ||
# - name: Install grcov | ||
# run: | | ||
# wget -O grcov.tar.gz https://github.com/mozilla/grcov/releases/download/v0.8.2/grcov-linux-x86_64.tar.bz2 | ||
# tar -xvf grcov.tar.gz | ||
# sudo mv -v grcov /home/runner/.cargo/bin/ | ||
# rm -rv grcov.tar.gz | ||
|
||
# - name: Run Coverage Tool (grcov) | ||
# uses: actions-rs/[email protected] | ||
# id: coverage | ||
|
||
# - name: Coveralls upload | ||
# uses: coverallsapp/github-action@master | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# path-to-lcov: ${{ steps.coverage.outputs.report }} |
Oops, something went wrong.