on:
  push:
    branches: [master]
  pull_request:
name: cargo test
jobs:
  test:
    runs-on: ${{ matrix.os }}
    name: ${{ matrix.os }} / ${{ matrix.browser }} (${{ matrix.toolchain }})
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        browser: [firefox, chrome]
        toolchain: [stable]
        include:
          - os: ubuntu-latest
            browser: chrome
            toolchain: beta
          - os: ubuntu-latest
            browser: chrome
            toolchain: nightly
    steps:
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.toolchain }}
      - uses: actions/checkout@v2
      - name: Install ${{ matrix.browser }}
        run: |
          ./ci/${{ matrix.os }}-${{ matrix.browser }}
      - name: cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: ${{ matrix.browser }}
