wasm-rs-async-executor 0.9.0

Async executor for WebAssembly
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always


jobs:
  test:
    name: Test Suite
    runs-on: ubuntu-latest

    timeout-minutes: 30

    strategy:
      fail-fast: false
      matrix:
        toolchain: ['1.49.0', '1.50.0', 'stable', 'nightly']

    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install ${{matrix.toolchain}} toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{matrix.toolchain}}
          override: true

      - name: Run cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features

  wasm:
    name: WebAssembly
    runs-on: ubuntu-latest

    timeout-minutes: 30

    strategy:
      matrix:
        toolchain: ['stable']

    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '12'

      - name: Install ${{matrix.toolchain}} toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          target: wasm32-unknown-unknown
          toolchain: ${{matrix.toolchain}}
          override: true

      - name: Install wasm-pack
        uses: jetli/wasm-pack-action@v0.3.0
        with:
          version: 'latest'

      - name: Use wasmtime 0.23.0
        uses: mwilliamson/setup-wasmtime-action@v1
        with:
          wasmtime-version: "0.23.0"

      - name: Install wasmer
        run: |-
          curl https://get.wasmer.io -sSfL | sh

      - name: Check if it tests under Node.js
        run: |-
          wasm-pack test --node -- --all-features

      - name: Check if it tests under wasmtime
        run: |-
          cargo test --target wasm32-wasi --all-features

      - name: Check if it tests under wasmer
        run: |-
          source ~/.wasmer/wasmer.sh
          cp .cargo/config.wasmer.toml .cargo/config.toml
          cargo test --target wasm32-wasi --all-features

  lints:
    name: Lints
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        toolchain: ['stable']

    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install ${{matrix.toolchain}} toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{matrix.toolchain}}
          override: true
          components: rustfmt, clippy

      - name: Run cargo fmt
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

      - name: Run cargo clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: -- -D warnings