name: windows-smoke

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

jobs:
  smoke:
    runs-on: windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - name: Install
        run: |
          python -m pip install -U pip
          python -m pip install -r requirements.txt -r requirements-dev.txt
          python -m pip install -e .
      - name: Smoke test CLI
        shell: pwsh
        run: |
          teds --version
          teds verify demo/sample_tests.yaml --output-level warning
          $rc = $LASTEXITCODE
          Write-Host "exit code: $rc"
          if ($rc -ne 1) {
            Write-Error "Expected exit code 1, got $rc"
            exit 1
          }
          exit 0
