libp2p get providers and handle peer requests for records #289
Workflow file for this run
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
name: 🧪 Tests and Checks | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ '**' ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
# minimum version | |
- 1.66 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Smarter caching action, speeds up build times compared to regular cache: | |
# https://github.com/Swatinem/rust-cache | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust Toolchain | |
id: toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
components: rustfmt, clippy | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Override rust-toolchain.toml | |
run: rustup override set ${{steps.toolchain.outputs.name}} | |
- name: Check Format | |
run: cargo fmt --all -- --check | |
- name: Run Linter | |
run: cargo clippy --all -- -D warnings | |
# Check for security advisories | |
- name: Check Advisories | |
if: ${{ matrix.rust-toolchain == 'stable' }} | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check advisories | |
continue-on-error: true | |
# Audit licenses, unreleased crates, and unexpected duplicate versions. | |
- name: Check Bans, Licenses, and Sources | |
if: ${{ matrix.rust-toolchain == 'stable' }} | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check bans licenses sources | |
# Only "test" release build on push event. | |
- name: Test Release | |
if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }} | |
run: cargo build --release | |
run-tests-all-features: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust Toolchain | |
id: toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Override rust-toolchain.toml | |
run: rustup override set ${{steps.toolchain.outputs.name}} | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Run Tests | |
run: cargo nextest run --all-features | |
- name: Run Doc Tests | |
run: cargo test --doc | |
run-tests-no-default-features: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust Toolchain | |
id: toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Override rust-toolchain.toml | |
run: rustup override set ${{steps.toolchain.outputs.name}} | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Run Tests | |
run: cargo nextest run --no-default-features | |
run-docs: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust Toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run Doc(s) compilation | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
run: cargo doc --document-private-items |