name: CI - .NET

on:
  workflow_call:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  lint:
    name: Lint
    uses: ./.github/workflows/bazel.yml
    with:
      name: Lint
      os: windows
      run: ./go dotnet:lint

  build:
    name: Build
    uses: ./.github/workflows/bazel.yml
    with:
      name: Build
      os: windows
      run: bazel build //dotnet:all

  integration-tests:
    name: Browser Tests
    uses: ./.github/workflows/bazel.yml
    with:
      name: Browser Tests
      os: windows
      needs-display: true
      run: |
        bazel test //dotnet/test/webdriver:ElementFindingTests-firefox //dotnet/test/webdriver:ElementFindingTests-chrome

  remote-tests:
    name: Remote Tests
    uses: ./.github/workflows/bazel.yml
    with:
      name: Remote Tests
      os: windows
      needs-display: true
      run: |
        bazel test //dotnet/test/remote --flaky_test_attempts=3
