Skip to content

Commit

Permalink
ci: run 2 prod integ tests on every dev pr to revent regression
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Nov 11, 2023
1 parent 82b8e9c commit 6159d81
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/desktop-linux-prod-test-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Desktop-Linux prod release full test suite run on pull request'
# we only do this on linux as a sanity. detailed tests will be run on pulls on staging/prod branch
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-latest
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

- 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:prod
- name: Download phoenix desktop and build test runner
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
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
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
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 LegacyInteg tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 3
command: xvfb-run ../phoenix-desktop/src-tauri/target/debug/phoenix-test --run-tests=LegacyInteg -q
59 changes: 59 additions & 0 deletions .github/workflows/playwright-chromium-windows-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Chromium-windows prod release run full tests suite
# we only do this on windows on chrome as a sanity. detailed tests will be run on pulls on staging/prod branch
on:
pull_request:
branches: [ main ]

concurrency:
group: pr-chromium-windows-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
playwright-chromium-windows:
timeout-minutes: 90
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Build phoenix
run: |
npm run build
npm run release:prod
- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright unit tests in Chromium for prod stage
uses: nick-fields/retry@v2
with:
timeout_minutes: 12
max_attempts: 3
command: npm run testChromiumDist

- name: Run Playwright integration tests in Chromium for prod stage
uses: nick-fields/retry@v2
with:
timeout_minutes: 12
max_attempts: 3
command: npx cross-env TEST_ENV=integration npm run testChromiumDist

- name: Run Playwright mainview tests in Chromium for prod stage
uses: nick-fields/retry@v2
with:
timeout_minutes: 12
max_attempts: 3
command: npx cross-env TEST_ENV=mainview npm run testChromiumDist

- name: Run Playwright livepreview tests in Chromium for prod stage
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: npx cross-env TEST_ENV=livepreview npm run testChromiumDist

- name: Run Playwright LegacyInteg tests in Chromium for prod stage
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: npx cross-env TEST_ENV=LegacyInteg npm run testChromiumDist

0 comments on commit 6159d81

Please sign in to comment.