rings-node 0.2.2

Chord DHT implementation with ICE
Documentation
name: QACI

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
      - develop

env:
  CARGO_TERM_COLOR: always
  WASM_BINDGEN_TEST_TIMEOUT: 40

jobs:
  build_wasm:
    name: Build and test for wasm
    timeout-minutes: 10
    strategy:
      matrix:
        os: ["ubuntu-latest"]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3

      - name: Setup rust toolchain
        run: rustup show

      - uses: jetli/wasm-bindgen-action@v0.1.0
        with:
          version: "0.2.83"

      # If you need to reset the cache version, increment the number after `v`
      - uses: Swatinem/rust-cache@v1
        with:
          sharedKey: wasm-v1

      - name: Run clippy for wasm
        run: cargo clippy -p rings-core --features wasm --no-deps --no-default-features --target=wasm32-unknown-unknown --tests -- -D warnings

      - name: Build
        run: cargo build -p rings-core --target=wasm32-unknown-unknown --features wasm --no-default-features

      - name: Run tests
        uses: GabrielBB/xvfb-action@v1
        with:
          working-directory: ./rings-core
          run: cargo test --target=wasm32-unknown-unknown --features wasm --no-default-features

      - name: Run rings-node test
        uses: GabrielBB/xvfb-action@v1
        with:
          run: cargo test --target=wasm32-unknown-unknown --features browser --no-default-features

  build:
    name: Build and test
    timeout-minutes: 20
    strategy:
      matrix:
        os: ["ubuntu-latest"]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3

      - name: Setup rust toolchain
        run: rustup show

      # If you need to reset the cache version, increment the number after `v`
      - uses: Swatinem/rust-cache@v1
        with:
          sharedKey: default-v1

      - name: Build
        run: cargo build --all --verbose

      - name: Run dummy tests
        run: cargo test -p rings-core --features dummy --verbose

      - name: Run tests
        run: cargo test --all --verbose

  rustfmt_and_clippy:
    name: Check rustfmt style && run clippy
    timeout-minutes: 10
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Check typos
        uses: crate-ci/typos@master

      - name: Setup rust toolchain
        run: rustup show

      # If you need to reset the cache version, increment the number after `v`
      - uses: Swatinem/rust-cache@v1
        with:
          sharedKey: static-v1

      - name: Run clippy
        run: cargo clippy --all --tests -- -D warnings

      - name: Check formating
        run: cargo fmt --all -- --check

      - name: Install taplo
        run: cargo install taplo-cli

      - name: Check toml file formating by taplo
        run: taplo format --check