name: Smoke Test (Mock Mode)
permissions:
  contents: read

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  smoke-test:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    
    - name: Use Node.js
      uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
      with:
        node-version: '20'
        cache: 'npm'
        
    - name: Install dependencies
      run: npm ci

    - name: Build
      run: npm run build

    - name: Run Smoke Test
      run: npm run test:smoke
      env:
        MOCK_UNREAL_CONNECTION: "true"
