name: Test
on:
  schedule:
    - cron: '0 4 * * *'
  pull_request:
  workflow_dispatch:

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [windows-2016, windows-2019, ubuntu-18.04, ubuntu-20.04]
        dotnet: [3.1.x, 5.0.x]
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2

      - name: Setup .NET
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: ${{ matrix.dotnet }}

      - name: Run functional tests
        env:
          # Required for multiple target frameworks in the StandardTests project.
          DOTNET: ${{ matrix.dotnet }}
        run: dotnet test Bandwidth.Iris.Tests

      # - name: Notify Slack of failures
      #   uses: Bandwidth/build-notify-slack-action@v1.0.0
      #   if: failure() && !github.event.pull_request.draft
      #   with:
      #     job-status: ${{ job.status }}
      #     slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
      #     slack-channel: ${{ secrets.SLACK_CHANNEL }}

name: Test
on:
  schedule:
    - cron: '0 4 * * *'
  pull_request:
  workflow_dispatch:

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [windows-2016, windows-2019, ubuntu-18.04, ubuntu-20.04]
        dotnet: [3.1.x, 5.0.x]
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2

      - name: Setup .NET
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: ${{ matrix.dotnet }}

      - name: Run functional tests
        env:
          # Required for multiple target frameworks in the StandardTests project.
          DOTNET: ${{ matrix.dotnet }}
        run: dotnet test Bandwidth.Iris.Tests

      - name: Notify Slack of failures
        uses: Bandwidth/build-notify-slack-action@v1.0.0
        if: failure() && !github.event.pull_request.draft
        with:
          job-status: ${{ job.status }}
          slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
          slack-channel: ${{ secrets.SLACK_CHANNEL }}

Enable slack notifications for failures
Enable slack notifications for failures
