|
1 |
| -name: Run android regression tests |
| 1 | +name: Run desktop regression tests |
2 | 2 | on:
|
3 | 3 | workflow_dispatch:
|
4 | 4 | inputs:
|
|
12 | 12 | - bilb/session-playwright
|
13 | 13 | default: oxen-io/session-playwright
|
14 | 14 |
|
| 15 | + BRANCH_TO_CHECKOUT_PW: |
| 16 | + description: 'branch to checkout on session-playwright' |
| 17 | + required: true |
| 18 | + type: string |
| 19 | + default: main |
| 20 | + |
| 21 | + SESSION_DESKTOP_REPO: |
| 22 | + description: 'Session desktop repo to checkout' |
| 23 | + required: true |
| 24 | + type: choice |
| 25 | + options: |
| 26 | + - oxen-io/session-desktop |
| 27 | + - bilb/session-desktop |
| 28 | + - yougotwill/session-desktop |
| 29 | + default: oxen-io/session-desktop |
| 30 | + |
| 31 | + BRANCH_TO_CHECKOUT_SESSION: |
| 32 | + description: 'Branch to checkout on session-desktop' |
| 33 | + required: true |
| 34 | + type: string |
| 35 | + default: unstable |
| 36 | + |
| 37 | + PLAYWRIGHT_REPEAT_COUNT: |
| 38 | + description: 'Repeats of each tests (0 to only run each once)' |
| 39 | + required: true |
| 40 | + type: number |
| 41 | + default: 0 |
| 42 | + |
| 43 | + PLAYWRIGHT_RETRIES_COUNT: |
| 44 | + description: 'Retries of each tests (0 to only run each once, 1 to run another attempt)' |
| 45 | + required: true |
| 46 | + type: number |
| 47 | + default: 0 |
| 48 | + |
| 49 | + PLAYWRIGHT_WORKER_COUNT: |
| 50 | + description: 'Playwright workers to start' |
| 51 | + required: true |
| 52 | + type: number |
| 53 | + default: 4 |
| 54 | + |
| 55 | +concurrency: |
| 56 | + group: ${{ github.workflow }} |
| 57 | + cancel-in-progress: true |
| 58 | + |
15 | 59 | jobs:
|
16 | 60 | desktop-regression:
|
17 | 61 | name: Desktop Regression Tests
|
18 | 62 | runs-on: [self-hosted, linux, x64, qa-desktop]
|
| 63 | + container: |
| 64 | + image: ubuntu:latest |
| 65 | + |
| 66 | + env: |
| 67 | + SESSION_DESKTOP_ROOT: '$GITHUB_WORKSPACE/desktop' |
| 68 | + PLAYWRIGHT_CUSTOM_REPORTER: 1 |
| 69 | + PLAYWRIGHT_REPEAT_COUNT: ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }} |
| 70 | + PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }} |
| 71 | + PLAYWRIGHT_WORKER_COUNT: ${{ github.event.inputs.PLAYWRIGHT_WORKER_COUNT }} |
19 | 72 |
|
20 | 73 | steps:
|
21 | 74 | - uses: actions/checkout@v4
|
| 75 | + - name: Runner Details |
| 76 | + run: | |
| 77 | + echo "SESSION_DESKTOP_ROOT ${{ env.SESSION_DESKTOP_ROOT }}" |
| 78 | + echo "PLAYWRIGHT_REPO ${{ github.event.inputs.PLAYWRIGHT_REPO }}" |
| 79 | + echo "BRANCH_TO_CHECKOUT_PW ${{ github.event.inputs.BRANCH_TO_CHECKOUT_PW }}" |
| 80 | + echo "SESSION_DESKTOP_REPO ${{ github.event.inputs.SESSION_DESKTOP_REPO }}" |
| 81 | + echo "BRANCH_TO_CHECKOUT_SESSION ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }}" |
| 82 | +
|
| 83 | + - uses: actions/checkout@v4 |
| 84 | + name: 'Checkout playwright' |
| 85 | + with: |
| 86 | + repository: ${{ github.event.inputs.PLAYWRIGHT_REPO }} |
| 87 | + ref: ${{ github.event.inputs.BRANCH_TO_CHECKOUT_PW }} |
| 88 | + path: 'playwright' |
| 89 | + |
| 90 | + - name: Install system deps |
| 91 | + run: apt update && apt install -y git g++ build-essential cmake |
| 92 | + |
| 93 | + - uses: actions/checkout@v4 |
| 94 | + name: 'Checkout Session desktop' |
| 95 | + with: |
| 96 | + repository: ${{ github.event.inputs.SESSION_DESKTOP_REPO }} |
| 97 | + ref: ${{ github.event.inputs.BRANCH_TO_CHECKOUT_SESSION }} |
| 98 | + path: 'desktop' |
| 99 | + |
| 100 | + - name: Install yarn |
| 101 | + run: | |
| 102 | + npm install -g yarn |
| 103 | +
|
| 104 | + - name: List desktop folder |
| 105 | + run: | |
| 106 | + pwd |
| 107 | + ls -la desktop |
| 108 | +
|
| 109 | + - name: List playwright folder |
| 110 | + run: | |
| 111 | + pwd |
| 112 | + ls -la playwright |
| 113 | +
|
| 114 | + - name: Build desktop |
| 115 | + working-directory: desktop |
| 116 | + uses: ./actions/setup_and_build |
| 117 | + run: echo "plop" |
| 118 | + |
| 119 | + - name: Install playwright dependencies |
| 120 | + run: | |
| 121 | + cd $GITHUB_WORKSPACE/playwright |
| 122 | + yarn install --frozen-lockfile |
| 123 | +
|
| 124 | + - name: Build the Desktop tests |
| 125 | + run: | |
| 126 | + cd $GITHUB_WORKSPACE/desktop |
| 127 | + yarn build-everything |
| 128 | +
|
| 129 | + - name: Build the Desktop tests |
| 130 | + run: | |
| 131 | + cd $GITHUB_WORKSPACE/playwright |
| 132 | + yarn tsc |
| 133 | +
|
| 134 | + - name: Run the Android tests |
| 135 | + run: | |
| 136 | + cd $GITHUB_WORKSPACE/playwright |
| 137 | + yarn test -g "Create User" |
| 138 | +
|
| 139 | + - name: Kill all running electron app |
| 140 | + if: always() |
| 141 | + continue-on-error: true # just so we don't fail |
| 142 | + shell: bash |
| 143 | + run: | |
| 144 | + killall electron; |
0 commit comments