async-wsocket 0.14.0

A convenience library for using websockets both in native and WASM environments!
Documentation
name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install nightly toolchain
        run: rustup install nightly

      - name: Add rustfmt for nightly
        run: rustup component add rustfmt --toolchain nightly

      - name: Check
        run: cargo +nightly fmt --all --check -- --config format_code_in_doc_comments=true

  check:
    name: Check crates
    runs-on: ubuntu-latest
    strategy:
      matrix:
        args:
          - ""
          - --features socks
          - --target wasm32-unknown-unknown
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Rust Cache
        uses: Swatinem/rust-cache@v2.7.8
        with:
          key: ${{ matrix.args }}

      - name: Check
        run: cargo check ${{ matrix.args }}

      - name: Clippy
        run: cargo clippy ${{ matrix.args }} -- -D warnings

      - name: Test
        if: "!contains(matrix.args, 'wasm32-')"
        run: cargo test ${{ matrix.args }}