wascc-host 0.14.0

WebAssembly Secure Capabilities Connector (waSCC) Host Runtime
Documentation
name: Rust

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

jobs:
  build:
    name: Build all features
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Run fmt
      run: cargo fmt -- --check
    - name: Build
      run: cargo build --verbose --all-features

  test_no_nats:
    name: Test without lattice and NATS
    runs-on: ubuntu-latest
    strategy:
      matrix:
        engine: ["wasm3", "wasmtime"]

    services:
      redis:
        image: redis
        ports:
          - 6379:6379
    steps:
      - uses: actions/checkout@v2
      - name: Run tests (no lattice no NATS)
        run: cargo test --features "bin ${{ matrix.engine }}" -- --test-threads=1
  
  test:
    name: Test feature matrix
    runs-on: ubuntu-latest
    strategy:
      matrix:
        engine: ["wasm3", "wasmtime"]

    services:
      nats:
        image: nats
        ports:
          - 6222:6222
          - 4222:4222
          - 8222:8222
      
      redis:
        image: redis
        ports:
          - 6379:6379

    steps:
      - uses: actions/checkout@v2
      - name: Run tests (featureless)
        run: cargo test --features "bin ${{ matrix.engine }}" -- --test-threads=1
      - name: Run tests (Everything but Lattice)
        run: cargo test --features "manifest bin ${{ matrix.engine }}" -- --test-threads=1
      - name: Run tests (manifest only)
        run: cargo test --features "manifest ${{ matrix.engine }}" -- --test-threads=1
      - name: Run tests (lattice mode)
        run: cargo test --features "lattice bin manifest ${{ matrix.engine }}" --test integration -- --test-threads=1
        env:
          LATTICE_HOST: 0.0.0.0
          LATTICE_RPC_TIMEOUT_MILLIS: 100