-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7748 from Tribler/feature/AT_to_PR
Add the Application Tester to the PR checks
- Loading branch information
Showing
5 changed files
with
124 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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,19 @@ | ||
name: 'Add to PYTHONPATH' | ||
description: 'Add specified paths to PYTHONPATH for all supported OS' | ||
inputs: | ||
path: | ||
description: 'Path to be added to PYTHONPATH' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Add to PYTHONPATH on Linux or macOS | ||
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} | ||
shell: bash | ||
run: echo "PYTHONPATH=${{ inputs.path }}:$PYTHONPATH" >> $GITHUB_ENV | ||
|
||
- name: Add to PYTHONPATH on Windows | ||
if: ${{ runner.os == 'Windows' }} | ||
shell: pwsh | ||
run: echo "PYTHONPATH=${{ inputs.path }};$env:PYTHONPATH" | Out-String | Add-Content -Path $env:GITHUB_ENV |
This file contains 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
This file contains 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,78 @@ | ||
name: GUI test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python-version: | ||
default: 3.8 | ||
type: string | ||
required: false | ||
|
||
matrix: | ||
default: '{"os":["windows-latest", "macos-latest", "ubuntu-latest"]}' | ||
type: string | ||
required: false | ||
|
||
ref: | ||
default: ${{ github.ref }} | ||
type: string | ||
required: false | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJson(inputs.matrix)}} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{inputs.ref}} | ||
|
||
- name: Create python environment | ||
uses: ./.github/actions/pyenv | ||
with: | ||
python-version: ${{inputs.python-version}} | ||
requirements: requirements.txt | ||
custom_cache_key_element: ${{inputs.ref}} | ||
|
||
- name: Add Tribler to PYTHONPATH | ||
uses: ./.github/actions/add-pythonpath | ||
with: | ||
path: ./src | ||
|
||
- name: Add Application Tester to PYTHONPATH | ||
uses: ./.github/actions/add-pythonpath | ||
with: | ||
path: ./scripts/application_tester | ||
|
||
- name: Install dependencies (Win) | ||
if: runner.os == 'Windows' | ||
uses: ./.github/actions/windows_dependencies | ||
|
||
- name: Install dependencies (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt install pyqt5-dev-tools | ||
- name: Setup headless display (Linux) | ||
if: runner.os == 'Linux' | ||
uses: pyvista/setup-headless-display-action@v1 | ||
|
||
- name: Application Tester | ||
timeout-minutes: 5 | ||
env: | ||
CORE_API_PORT: 20100 | ||
run: | | ||
python ./scripts/application_tester/main.py -p "python src/run_tribler.py" --fragile -d 120 |
This file contains 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
This file contains 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