|
| 1 | +name: AutoQA Reliability (Manual) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + source_type: |
| 7 | + description: 'App source type (url or local)' |
| 8 | + required: true |
| 9 | + type: choice |
| 10 | + options: [url, local] |
| 11 | + default: url |
| 12 | + jan_app_windows_source: |
| 13 | + description: 'Windows installer URL or local path (used when source_type=url or to select artifact)' |
| 14 | + required: true |
| 15 | + type: string |
| 16 | + default: 'https://catalog.jan.ai/windows/Jan_0.6.8_x64-setup.exe' |
| 17 | + jan_app_ubuntu_source: |
| 18 | + description: 'Ubuntu .deb URL or local path' |
| 19 | + required: true |
| 20 | + type: string |
| 21 | + default: 'https://delta.jan.ai/nightly/Jan-nightly_0.6.4-728_amd64.deb' |
| 22 | + jan_app_macos_source: |
| 23 | + description: 'macOS .dmg URL or local path' |
| 24 | + required: true |
| 25 | + type: string |
| 26 | + default: 'https://delta.jan.ai/nightly/Jan-nightly_0.6.4-728_universal.dmg' |
| 27 | + is_nightly: |
| 28 | + description: 'Is the app a nightly build?' |
| 29 | + required: true |
| 30 | + type: boolean |
| 31 | + default: true |
| 32 | + reliability_phase: |
| 33 | + description: 'Reliability phase' |
| 34 | + required: true |
| 35 | + type: choice |
| 36 | + options: [development, deployment] |
| 37 | + default: development |
| 38 | + reliability_runs: |
| 39 | + description: 'Custom runs (0 uses phase default)' |
| 40 | + required: true |
| 41 | + type: number |
| 42 | + default: 0 |
| 43 | + reliability_test_path: |
| 44 | + description: 'Test file path (relative to autoqa working directory)' |
| 45 | + required: true |
| 46 | + type: string |
| 47 | + default: 'tests/base/settings/app-data.txt' |
| 48 | + artifact_name_windows: |
| 49 | + description: 'Windows artifact name (only for source_type=local)' |
| 50 | + required: false |
| 51 | + type: string |
| 52 | + default: '' |
| 53 | + artifact_name_ubuntu: |
| 54 | + description: 'Ubuntu artifact name (only for source_type=local)' |
| 55 | + required: false |
| 56 | + type: string |
| 57 | + default: '' |
| 58 | + artifact_name_macos: |
| 59 | + description: 'macOS artifact name (only for source_type=local)' |
| 60 | + required: false |
| 61 | + type: string |
| 62 | + default: '' |
| 63 | + |
| 64 | +jobs: |
| 65 | + reliability-windows: |
| 66 | + runs-on: windows-11-nvidia-gpu |
| 67 | + timeout-minutes: 60 |
| 68 | + env: |
| 69 | + DEFAULT_JAN_APP_URL: 'https://catalog.jan.ai/windows/Jan_0.6.8_x64-setup.exe' |
| 70 | + DEFAULT_IS_NIGHTLY: 'false' |
| 71 | + steps: |
| 72 | + - name: Checkout repository |
| 73 | + uses: actions/checkout@v4 |
| 74 | + |
| 75 | + - name: Setup Python 3.13 |
| 76 | + uses: actions/setup-python@v4 |
| 77 | + with: |
| 78 | + python-version: '3.13' |
| 79 | + |
| 80 | + - name: Download artifact (if source_type is local) |
| 81 | + if: inputs.source_type == 'local' |
| 82 | + uses: actions/download-artifact@v4 |
| 83 | + with: |
| 84 | + name: ${{ inputs.artifact_name_windows }} |
| 85 | + path: ${{ runner.temp }}/windows-artifact |
| 86 | + |
| 87 | + - name: Clean existing Jan installations |
| 88 | + shell: powershell |
| 89 | + run: | |
| 90 | + .\autoqa\scripts\windows_cleanup.ps1 -IsNightly "${{ inputs.is_nightly }}" |
| 91 | +
|
| 92 | + - name: Download/Prepare Jan app |
| 93 | + shell: powershell |
| 94 | + run: | |
| 95 | + if ("${{ inputs.source_type }}" -eq "local") { |
| 96 | + $exeFile = Get-ChildItem -Path "${{ runner.temp }}/windows-artifact" -Recurse -Filter "*.exe" | Select-Object -First 1 |
| 97 | + if ($exeFile) { |
| 98 | + Write-Host "[SUCCESS] Found local installer: $($exeFile.FullName)" |
| 99 | + Copy-Item -Path $exeFile.FullName -Destination "$env:TEMP\jan-installer.exe" -Force |
| 100 | + Write-Host "[SUCCESS] Installer copied to: $env:TEMP\jan-installer.exe" |
| 101 | + echo "IS_NIGHTLY=${{ inputs.is_nightly }}" >> $env:GITHUB_ENV |
| 102 | + } else { |
| 103 | + Write-Error "[FAILED] No .exe file found in artifact" |
| 104 | + exit 1 |
| 105 | + } |
| 106 | + } else { |
| 107 | + .\autoqa\scripts\windows_download.ps1 ` |
| 108 | + -WorkflowInputUrl "${{ inputs.jan_app_windows_source }}" ` |
| 109 | + -WorkflowInputIsNightly "${{ inputs.is_nightly }}" ` |
| 110 | + -RepoVariableUrl "${{ vars.JAN_APP_URL }}" ` |
| 111 | + -RepoVariableIsNightly "${{ vars.IS_NIGHTLY }}" ` |
| 112 | + -DefaultUrl "$env:DEFAULT_JAN_APP_URL" ` |
| 113 | + -DefaultIsNightly "$env:DEFAULT_IS_NIGHTLY" |
| 114 | + } |
| 115 | +
|
| 116 | + - name: Install Jan app |
| 117 | + shell: powershell |
| 118 | + run: | |
| 119 | + .\autoqa\scripts\windows_install.ps1 -IsNightly "$env:IS_NIGHTLY" |
| 120 | +
|
| 121 | + - name: Install Python dependencies |
| 122 | + working-directory: autoqa |
| 123 | + run: | |
| 124 | + python -m pip install --upgrade pip |
| 125 | + pip install -r requirements.txt |
| 126 | +
|
| 127 | + - name: Run reliability tests |
| 128 | + working-directory: autoqa |
| 129 | + shell: powershell |
| 130 | + run: | |
| 131 | + $runs = "${{ inputs.reliability_runs }}" |
| 132 | + $runsArg = "" |
| 133 | + if ([int]$runs -gt 0) { $runsArg = "--reliability-runs $runs" } |
| 134 | + python main.py --enable-reliability-test --reliability-phase "${{ inputs.reliability_phase }}" --reliability-test-path "${{ inputs.reliability_test_path }}" $runsArg |
| 135 | +
|
| 136 | + - name: Upload screen recordings |
| 137 | + if: always() |
| 138 | + uses: actions/upload-artifact@v4 |
| 139 | + continue-on-error: true |
| 140 | + with: |
| 141 | + name: reliability-recordings-${{ github.run_number }}-${{ runner.os }} |
| 142 | + path: autoqa/recordings/ |
| 143 | + |
| 144 | + - name: Upload trajectories |
| 145 | + if: always() |
| 146 | + uses: actions/upload-artifact@v4 |
| 147 | + continue-on-error: true |
| 148 | + with: |
| 149 | + name: reliability-trajectories-${{ github.run_number }}-${{ runner.os }} |
| 150 | + path: autoqa/trajectories/ |
| 151 | + |
| 152 | + - name: Cleanup after tests |
| 153 | + if: always() |
| 154 | + shell: powershell |
| 155 | + run: | |
| 156 | + .\autoqa\scripts\windows_post_cleanup.ps1 -IsNightly "${{ inputs.is_nightly }}" |
0 commit comments