Skip to content

Live Preview Edit Fixes #1649

Live Preview Edit Fixes

Live Preview Edit Fixes #1649

name: 'Desktop-Linux full test suite run on pull request'
on:
pull_request:
branches: [ main ]
concurrency:
group: pr-desktop-linux-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
test-desktop-linux:
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 20
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.1
- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
sudo apt install build-essential curl wget file libssl-dev libayatana-appindicator3-dev
sudo apt-get install xvfb
- name: build phoenix dist-test
run: |
npm ci
npm run build
npm run release:dev
- name: Download phoenix desktop and build test runner
env:
GH_TOKEN: ${{ github.token }}
run: |
cd ..
git clone https://github.com/phcode-dev/phoenix-desktop.git
cd phoenix-desktop
npm ci
npm run releaseDistTestDebug
- name: Run tauri unit tests
uses: nick-fields/retry@v2
id: linuxRunUnit
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: xvfb-run ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=unit -q
- name: Run tauri integration tests
uses: nick-fields/retry@v2
id: linuxRunIntegration
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: xvfb-run ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=integration -q
- name: Run tauri mainview tests
uses: nick-fields/retry@v2
id: linuxRunMainview
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: xvfb-run ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=mainview -q
- name: Run tauri livepreview tests
uses: nick-fields/retry@v2
id: linuxRunLivepreview
continue-on-error: true
with:
timeout_minutes: 12
max_attempts: 3
command: xvfb-run ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=livepreview -q
- name: Run tauri LegacyInteg tests
uses: nick-fields/retry@v2
id: linuxRunLegacyInteg
continue-on-error: true
with:
timeout_minutes: 20
max_attempts: 3
command: xvfb-run ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=LegacyInteg -q
- name: Fail on test runs failed in Linux
if: steps.linuxRunUnit.outcome == 'failure' || steps.linuxRunIntegration.outcome == 'failure' || steps.linuxRunMainview.outcome == 'failure' || steps.linuxRunLivepreview.outcome == 'failure' || steps.linuxRunLegacyInteg.outcome == 'failure'
run: |
echo "Linux tests failed, marking step as failed"
echo "Failed tests:"
if [ "${{ steps.linuxRunUnit.outcome }}" == "failure" ]; then
echo "- Run tauri unit tests"
fi
if [ "${{ steps.linuxRunIntegration.outcome }}" == "failure" ]; then
echo "- Run tauri integration tests"
fi
if [ "${{ steps.linuxRunMainview.outcome }}" == "failure" ]; then
echo "- Run tauri mainview tests"
fi
if [ "${{ steps.linuxRunLivepreview.outcome }}" == "failure" ]; then
echo "- Run tauri livepreview tests"
fi
if [ "${{ steps.linuxRunLegacyInteg.outcome }}" == "failure" ]; then
echo "- Run tauri LegacyInteg tests"
fi
exit 1