-
Notifications
You must be signed in to change notification settings - Fork 2.4k
ci: add autoqa reliability workflow for windows #6248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| name: AutoQA Reliability (Manual) | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| source_type: | ||
| description: 'App source type (url or local)' | ||
| required: true | ||
| type: choice | ||
| options: [url, local] | ||
| default: url | ||
| jan_app_windows_source: | ||
| description: 'Windows installer URL or local path (used when source_type=url or to select artifact)' | ||
| required: true | ||
| type: string | ||
| default: 'https://catalog.jan.ai/windows/Jan_0.6.8_x64-setup.exe' | ||
| jan_app_ubuntu_source: | ||
| description: 'Ubuntu .deb URL or local path' | ||
| required: true | ||
| type: string | ||
| default: 'https://delta.jan.ai/nightly/Jan-nightly_0.6.4-728_amd64.deb' | ||
| jan_app_macos_source: | ||
| description: 'macOS .dmg URL or local path' | ||
| required: true | ||
| type: string | ||
| default: 'https://delta.jan.ai/nightly/Jan-nightly_0.6.4-728_universal.dmg' | ||
| is_nightly: | ||
| description: 'Is the app a nightly build?' | ||
| required: true | ||
| type: boolean | ||
| default: true | ||
| reliability_phase: | ||
| description: 'Reliability phase' | ||
| required: true | ||
| type: choice | ||
| options: [development, deployment] | ||
| default: development | ||
| reliability_runs: | ||
| description: 'Custom runs (0 uses phase default)' | ||
| required: true | ||
| type: number | ||
| default: 0 | ||
| reliability_test_path: | ||
| description: 'Test file path (relative to autoqa working directory)' | ||
| required: true | ||
| type: string | ||
| default: 'tests/base/settings/app-data.txt' | ||
| artifact_name_windows: | ||
| description: 'Windows artifact name (only for source_type=local)' | ||
| required: false | ||
| type: string | ||
| default: '' | ||
| artifact_name_ubuntu: | ||
| description: 'Ubuntu artifact name (only for source_type=local)' | ||
| required: false | ||
| type: string | ||
| default: '' | ||
| artifact_name_macos: | ||
| description: 'macOS artifact name (only for source_type=local)' | ||
| required: false | ||
| type: string | ||
| default: '' | ||
|
|
||
| jobs: | ||
| reliability-windows: | ||
| runs-on: windows-11-nvidia-gpu | ||
| timeout-minutes: 60 | ||
| env: | ||
| DEFAULT_JAN_APP_URL: 'https://catalog.jan.ai/windows/Jan_0.6.8_x64-setup.exe' | ||
| DEFAULT_IS_NIGHTLY: 'false' | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python 3.13 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Download artifact (if source_type is local) | ||
| if: inputs.source_type == 'local' | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ${{ inputs.artifact_name_windows }} | ||
| path: ${{ runner.temp }}/windows-artifact | ||
|
|
||
| - name: Clean existing Jan installations | ||
| shell: powershell | ||
| run: | | ||
| .\autoqa\scripts\windows_cleanup.ps1 -IsNightly "${{ inputs.is_nightly }}" | ||
|
|
||
| - name: Download/Prepare Jan app | ||
| shell: powershell | ||
| run: | | ||
| if ("${{ inputs.source_type }}" -eq "local") { | ||
| $exeFile = Get-ChildItem -Path "${{ runner.temp }}/windows-artifact" -Recurse -Filter "*.exe" | Select-Object -First 1 | ||
| if ($exeFile) { | ||
| Write-Host "[SUCCESS] Found local installer: $($exeFile.FullName)" | ||
| Copy-Item -Path $exeFile.FullName -Destination "$env:TEMP\jan-installer.exe" -Force | ||
| Write-Host "[SUCCESS] Installer copied to: $env:TEMP\jan-installer.exe" | ||
| echo "IS_NIGHTLY=${{ inputs.is_nightly }}" >> $env:GITHUB_ENV | ||
| } else { | ||
| Write-Error "[FAILED] No .exe file found in artifact" | ||
| exit 1 | ||
| } | ||
| } else { | ||
| .\autoqa\scripts\windows_download.ps1 ` | ||
| -WorkflowInputUrl "${{ inputs.jan_app_windows_source }}" ` | ||
| -WorkflowInputIsNightly "${{ inputs.is_nightly }}" ` | ||
| -RepoVariableUrl "${{ vars.JAN_APP_URL }}" ` | ||
| -RepoVariableIsNightly "${{ vars.IS_NIGHTLY }}" ` | ||
| -DefaultUrl "$env:DEFAULT_JAN_APP_URL" ` | ||
| -DefaultIsNightly "$env:DEFAULT_IS_NIGHTLY" | ||
| } | ||
|
|
||
| - name: Install Jan app | ||
| shell: powershell | ||
| run: | | ||
| .\autoqa\scripts\windows_install.ps1 -IsNightly "$env:IS_NIGHTLY" | ||
|
|
||
| - name: Install Python dependencies | ||
| working-directory: autoqa | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
|
|
||
| - name: Run reliability tests | ||
| working-directory: autoqa | ||
| shell: powershell | ||
| run: | | ||
| $runs = "${{ inputs.reliability_runs }}" | ||
| $runsArg = "" | ||
| if ([int]$runs -gt 0) { $runsArg = "--reliability-runs $runs" } | ||
| python main.py --enable-reliability-test --reliability-phase "${{ inputs.reliability_phase }}" --reliability-test-path "${{ inputs.reliability_test_path }}" $runsArg | ||
|
|
||
| - name: Upload screen recordings | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| continue-on-error: true | ||
| with: | ||
| name: reliability-recordings-${{ github.run_number }}-${{ runner.os }} | ||
| path: autoqa/recordings/ | ||
|
|
||
| - name: Upload trajectories | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| continue-on-error: true | ||
| with: | ||
| name: reliability-trajectories-${{ github.run_number }}-${{ runner.os }} | ||
| path: autoqa/trajectories/ | ||
|
|
||
| - name: Cleanup after tests | ||
| if: always() | ||
| shell: powershell | ||
| run: | | ||
| .\autoqa\scripts\windows_post_cleanup.ps1 -IsNightly "${{ inputs.is_nightly }}" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.