|
| 1 | +name: GUI Tests (Branded Client) |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + workflow_dispatch: |
| 6 | + schedule: |
| 7 | + - cron: "0 0 * * *" |
| 8 | + |
| 9 | +env: |
| 10 | + NPM_GHERLINT: "@gherlint/gherlint@1.1.0" |
| 11 | + S3_PUBLIC_CACHE_SERVER: "https://cache.owncloud.com" |
| 12 | + S3_PUBLIC_CACHE_BUCKET: "public" |
| 13 | + |
| 14 | +jobs: |
| 15 | + gui-tests: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + container: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 |
| 18 | + env: |
| 19 | + PLAYWRIGHT_BROWSERS_PATH: /__w/client/client/test/gui/.playwright |
| 20 | + GITHUB_REPO: ${{ github.repository }} |
| 21 | + GITHUB_RUN_NUMBER: ${{ github.run_number }} |
| 22 | + steps: |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v6 |
| 25 | + |
| 26 | + - name: Build client |
| 27 | + run: | |
| 28 | + mkdir -p build |
| 29 | + cd build |
| 30 | + cmake -G"Ninja" \ |
| 31 | + -DWITH_EXTERNAL_BRANDING=https://x-access-token:${{ secrets.KW_THEME_PAT }}@github.com/owncloud/client-desktop-theme-kiteworks.git \ |
| 32 | + -DCMAKE_BUILD_TYPE=Debug \ |
| 33 | + -DBUILD_TESTING=OFF \ |
| 34 | + -S .. |
| 35 | + ninja |
| 36 | +
|
| 37 | + - name: Install Python Modules |
| 38 | + run: | |
| 39 | + export PATH=$PATH:/github/home/.local/bin |
| 40 | + make -C test/gui install |
| 41 | + python3.10 -m pip list -v |
| 42 | +
|
| 43 | + - name: Create GUI test report directory |
| 44 | + run: | |
| 45 | + mkdir test/gui/guiReportUpload/screenshots -p |
| 46 | + chmod 777 test/gui -R |
| 47 | +
|
| 48 | + - name: Map predefined users |
| 49 | + run: echo "${{ secrets.PREDEFINED_USERS }}" | base64 -d > test/gui/users.json |
| 50 | + |
| 51 | + - name: Run GUI tests |
| 52 | + id: run_gui_test |
| 53 | + env: |
| 54 | + LICENSEKEY: ${{ secrets.SQUISH_LICENSEKEY }} |
| 55 | + GUI_TEST_REPORT_DIR: /__w/client/client/test/gui/guiReportUpload |
| 56 | + CLIENT_REPO: . |
| 57 | + CLIENT_NAME: ${{ secrets.CLIENT_NAME }} |
| 58 | + PERSONAL_SYNC_FOLDER: ${{ secrets.PERSONAL_SYNC_FOLDER }} |
| 59 | + PREDEFINED_USERS: users.json |
| 60 | + OCIS_URL: ${{secrets.BACKEND_HOST}} |
| 61 | + BACKEND_HOST: ${{secrets.BACKEND_HOST}} |
| 62 | + SECURE_BACKEND_HOST: ${{secrets.BACKEND_HOST}} |
| 63 | + OCIS: true |
| 64 | + SERVER_INI: test/gui/ci/client_server.ini |
| 65 | + SQUISH_PARAMETERS: > |
| 66 | + --testsuite test/gui |
| 67 | + --reportgen html,test/gui/guiReportUpload |
| 68 | + --envvar QT_LOGGING_RULES=sync.httplogger=true;gui.socketapi=false |
| 69 | + --tags ~@skip --tags ~@skipOnLinux --tags @predefined_users |
| 70 | + --abortOnFail |
| 71 | + STACKTRACE_FILE: test/gui/guiReportUpload/stacktrace.log |
| 72 | + OWNCLOUD_CORE_DUMP: 1 |
| 73 | + RECORD_VIDEO_ON_FAILURE: false |
| 74 | + COREPACK_ENABLE_STRICT: 0 |
| 75 | + HOME: /home/headless |
| 76 | + run: bash /dockerstartup/entrypoint.sh |
| 77 | + |
| 78 | + - name: Upload GUI test result |
| 79 | + if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} |
| 80 | + run: | |
| 81 | + curl -L https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc |
| 82 | + chmod +x /tmp/mc |
| 83 | + /tmp/mc alias set cache ${{ env.S3_PUBLIC_CACHE_SERVER }} ${{ secrets.CACHE_PUBLIC_S3_ACCESS_KEY }} ${{ secrets.CACHE_PUBLIC_S3_SECRET_KEY }} |
| 84 | + /tmp/mc cp --recursive test/gui/guiReportUpload cache/${{ env.S3_PUBLIC_CACHE_BUCKET }}/${{ github.repository }}/${{ github.run_number }}/ocis |
| 85 | +
|
| 86 | + - name: Log GUI reports |
| 87 | + if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} |
| 88 | + env: |
| 89 | + REPORT_DIR: /__w/client/client/test/gui/guiReportUpload |
| 90 | + SERVER_TYPE: ocis |
| 91 | + run: bash test/gui/ci/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE} |
| 92 | + |
| 93 | + notification: |
| 94 | + needs: gui-tests |
| 95 | + if: github.event_name == 'schedule' |
| 96 | + runs-on: ubuntu-latest |
| 97 | + container: |
| 98 | + image: owncloudci/alpine:latest |
| 99 | + steps: |
| 100 | + - name: Checkout |
| 101 | + uses: actions/checkout@v6 |
| 102 | + |
| 103 | + - name: notify-matrix |
| 104 | + env: |
| 105 | + CACHE_ENDPOINT: ${{ env.S3_PUBLIC_CACHE_SERVER }} |
| 106 | + CACHE_BUCKET: ${{ env.S3_PUBLIC_CACHE_BUCKET }} |
| 107 | + MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }} |
| 108 | + GITHUB_BUILD_STATUS: ${{ needs.gui-tests.result }} |
| 109 | + COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }} |
| 110 | + run: bash test/gui/ci/notification_template.sh . |
0 commit comments