|
6 | 6 | branches: [ testing_branch, local_testing_branch, main ] |
7 | 7 |
|
8 | 8 | jobs: |
| 9 | + desktop-chrome-test: |
| 10 | + if: github.event.action == 'push' |
| 11 | + name: Desktop Chrome - test branch |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Clone CryptPad repository |
| 15 | + env: |
| 16 | + PA_TOKEN: ${{ secrets.PAT_SECRET }} |
| 17 | + run: git clone "https://"$PA_TOKEN"@github.com/cryptpad/cryptpad.git" -b 2025.6_seed |
| 18 | + shell: bash |
| 19 | + - name: Seed database |
| 20 | + working-directory: cryptpad |
| 21 | + run: unzip -o database_seed_2025.6.zip |
| 22 | + if: always() |
| 23 | + - name: Checkout branch |
| 24 | + working-directory: cryptpad |
| 25 | + run: | |
| 26 | + git checkout 2026.4-test |
| 27 | + git branch |
| 28 | + - name: Install dependencies |
| 29 | + run: npm install --prefix cryptpad |
| 30 | + - name: Install components 1 |
| 31 | + run: npm ci --prefix cryptpad |
| 32 | + - name: Install components 2 |
| 33 | + run: npm run install:components --prefix cryptpad |
| 34 | + - name: Install OnlyOffice |
| 35 | + run: cryptpad/install-onlyoffice.sh -a |
| 36 | + if: always() |
| 37 | + - name: Run local server |
| 38 | + timeout-minutes: 180 |
| 39 | + run: nohup npm run dev --prefix cryptpad & |
| 40 | + - name: Clone test repository |
| 41 | + env: |
| 42 | + PA_TOKEN: ${{ secrets.PAT_SECRET }} |
| 43 | + run: git clone "https://"$PA_TOKEN"@github.com/cryptpad/e2e-test-suite.git" |
| 44 | + shell: bash |
| 45 | + - name: Install dependencies |
| 46 | + run: npm ci --prefix e2e-test-suite |
| 47 | + - name: Install dependencies 2 |
| 48 | + run: npm exec playwright install --with-deps --prefix e2e-test-suite |
| 49 | + - name: Install dependencies 3 |
| 50 | + run: npm exec playwright install-deps --prefix e2e-test-suite |
| 51 | + - name: Install test reporter |
| 52 | + run: npm install playwright-ctrf-json-reporter --prefix e2e-test-suite |
| 53 | + - name: Calibrate Playwright screenshot tests (anon) |
| 54 | + working-directory: e2e-test-suite |
| 55 | + run: npx playwright test -g "screenshot anon" --config=playwright.config.js --project='chrome' --workers=2 |
| 56 | + env: |
| 57 | + PW_URL: ${{ vars.PW_URL }} |
| 58 | + if: always() |
| 59 | + - name: Run Playwright tests (anon) |
| 60 | + working-directory: e2e-test-suite |
| 61 | + run: npx playwright test anon --config=playwright.config.js --project='chrome' --retries=1 --workers=2 |
| 62 | + env: |
| 63 | + PW_URL: ${{ vars.PW_URL }} |
| 64 | + if: always() |
| 65 | + - name: Publish Test Report (anon) |
| 66 | + uses: ctrf-io/github-test-reporter@v1 |
| 67 | + with: |
| 68 | + report-path: 'e2e-test-suite/ctrf/*.json' |
| 69 | + title: 'Test results - anonymous' |
| 70 | + if: always() |
| 71 | + - name: Create auth files |
| 72 | + working-directory: e2e-test-suite |
| 73 | + run: | |
| 74 | + mkdir auth |
| 75 | + cd auth |
| 76 | + touch mainuser.json testuser.json testuser2.json testuser3.json |
| 77 | + if: always() |
| 78 | + - name: Authenticate users |
| 79 | + working-directory: e2e-test-suite |
| 80 | + run: | |
| 81 | + npx playwright test auth --config=playwright.config.js --project='chrome' --workers=1 |
| 82 | + env: |
| 83 | + PW_URL: ${{ vars.PW_URL }} |
| 84 | + MAINACCOUNTPASSWORD: ${{ vars.MAINACCOUNTPASSWORD }} |
| 85 | + TESTUSERPASSWORD: ${{ vars.TESTUSERPASSWORD }} |
| 86 | + TESTUSER2PASSWORD: ${{ vars.TESTUSER2PASSWORD }} |
| 87 | + TESTUSER3PASSWORD: ${{ vars.TESTUSER3PASSWORD }} |
| 88 | + if: always() |
| 89 | + - name: Calibrate Playwright screenshot tests (logged in users) |
| 90 | + working-directory: e2e-test-suite |
| 91 | + run: npx playwright test -g "screenshot loggedin" --config=playwright.config.js --project='chrome' --workers=2 |
| 92 | + env: |
| 93 | + PW_URL: ${{ vars.PW_URL }} |
| 94 | + if: always() |
| 95 | + - name: Run Playwright tests (logged in users) |
| 96 | + working-directory: e2e-test-suite |
| 97 | + run: npx playwright test loggedin --config=playwright.config.js --project='chrome' --workers=1 --retries=3 |
| 98 | + env: |
| 99 | + PW_URL: ${{ vars.PW_URL }} |
| 100 | + MAINACCOUNTPASSWORD: ${{ vars.MAINACCOUNTPASSWORD }} |
| 101 | + TESTUSERPASSWORD: ${{ vars.TESTUSERPASSWORD }} |
| 102 | + TESTUSER2PASSWORD: ${{ vars.TESTUSER2PASSWORD }} |
| 103 | + TESTUSER3PASSWORD: ${{ vars.TESTUSER3PASSWORD }} |
| 104 | + if: always() |
| 105 | + - name: Publish Test Report (logged in users) |
| 106 | + uses: ctrf-io/github-test-reporter@v1 |
| 107 | + with: |
| 108 | + report-path: 'e2e-test-suite/ctrf/*.json' |
| 109 | + title: 'Test results - logged in users' |
| 110 | + if: always() |
9 | 111 | desktop-chrome-staging: |
10 | 112 | if: github.event.action == 'trigger-e2e-tests-staging' |
11 | 113 | name: Desktop Chrome - staging branch |
|
0 commit comments