From f49dea67f8d9b3d3311262d4517ea0da209cb61b Mon Sep 17 00:00:00 2001 From: Prajwol Amatya Date: Thu, 8 Jan 2026 10:44:19 +0545 Subject: [PATCH] setup gui tests for oc10 Signed-off-by: Prajwol Amatya --- .github/workflows/changelog.yml | 98 +++---- .github/workflows/gui-tests.yml | 482 +++++++++++++++++++++++--------- .github/workflows/main.yml | 354 +++++++++++------------ .github/workflows/stale.yml | 60 ++-- .github/workflows/translate.yml | 116 ++++---- 5 files changed, 668 insertions(+), 442 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 64de2fd49c9..38fb6e3860d 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,49 +1,49 @@ -name: Changelog - -on: - pull_request: - push: - branches: [ "6" ] - tags: [ "*" ] - -jobs: - changelog: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: read - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Generate changelog - uses: docker://toolhippie/calens:0.4.0 - with: - entrypoint: /bin/sh - args: -c "calens > CHANGELOG.md" - - - name: Show diff - run: git diff - - - name: Output - run: cat CHANGELOG.md - - - name: Publish - if: > - github.event_name == 'push' && - github.ref == 'refs/heads/master' && - !startsWith(github.ref, 'refs/tags/') && - !startsWith(github.ref, 'refs/pull/') - run: | - git config user.name "ownClouders" - git config user.email "devops@owncloud.com" - git add CHANGELOG.md - if git diff --staged --quiet; then - echo "No changes to commit" - exit 0 - fi - git commit -m "Automated changelog update [skip ci]" - git push origin master +#name: Changelog +# +#on: +# pull_request: +# push: +# branches: [ "6" ] +# tags: [ "*" ] +# +#jobs: +# changelog: +# runs-on: ubuntu-latest +# permissions: +# contents: write +# pull-requests: read +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# +# - name: Generate changelog +# uses: docker://toolhippie/calens:0.4.0 +# with: +# entrypoint: /bin/sh +# args: -c "calens > CHANGELOG.md" +# +# - name: Show diff +# run: git diff +# +# - name: Output +# run: cat CHANGELOG.md +# +# - name: Publish +# if: > +# github.event_name == 'push' && +# github.ref == 'refs/heads/master' && +# !startsWith(github.ref, 'refs/tags/') && +# !startsWith(github.ref, 'refs/pull/') +# run: | +# git config user.name "ownClouders" +# git config user.email "devops@owncloud.com" +# git add CHANGELOG.md +# if git diff --staged --quiet; then +# echo "No changes to commit" +# exit 0 +# fi +# git commit -m "Automated changelog update [skip ci]" +# git push origin master diff --git a/.github/workflows/gui-tests.yml b/.github/workflows/gui-tests.yml index 4ada43fcc77..807f69e5b45 100644 --- a/.github/workflows/gui-tests.yml +++ b/.github/workflows/gui-tests.yml @@ -14,108 +14,331 @@ env: S3_PUBLIC_CACHE_BUCKET: "public" jobs: - lint-gui-test: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - container: - image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup NodeJs - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Python lint - run: | - export PATH=$PATH:/github/home/.local/bin - make -C test/gui install - make -C test/gui python-lint - - - name: Gherkin lint - run: | - npm install -g ${{ env.NPM_GHERLINT }} - make -C test/gui gherkin-lint + # lint-gui-test: + # runs-on: ubuntu-latest + # if: github.event_name == 'pull_request' + # container: + # image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # + # - name: Setup NodeJs + # uses: actions/setup-node@v4 + # with: + # node-version: 18 + # + # - name: Python lint + # run: | + # export PATH=$PATH:/github/home/.local/bin + # make -C test/gui install + # make -C test/gui python-lint + # + # - name: Gherkin lint + # run: | + # npm install -g ${{ env.NPM_GHERLINT }} + # make -C test/gui gherkin-lint + # + # gui-tests: + # runs-on: ubuntu-latest + # container: + # image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 + # env: + # PLAYWRIGHT_BROWSERS_PATH: /__w/client/client/test/gui/.playwright + # GITHUB_REPO: ${{ github.repository }} + # GITHUB_RUN_NUMBER: ${{ github.run_number }} + # services: + # ocis: + # image: owncloud/ocis-rolling:latest + # ports: + # - 9200:9200 + # env: + # OCIS_URL: https://ocis:9200 + # OCIS_LOG_LEVEL: "error" + # OCIS_LOG_PRETTY: "true" + # OCIS_LOG_COLOR: "true" + # OCIS_INSECURE: "true" + # PROXY_ENABLE_BASIC_AUTH: "true" + # OCIS_ADMIN_USER_ID: "some-admin-user-id-0000-000000000000" + # IDM_ADMIN_PASSWORD: "admin" + # OCIS_SYSTEM_USER_ID: "some-system-user-id-000-000000000000" + # OCIS_SYSTEM_USER_API_KEY: "some-system-user-machine-auth-api-key" + # OCIS_JWT_SECRET: "some-ocis-jwt-secret" + # OCIS_MACHINE_AUTH_API_KEY: "some-ocis-machine-auth-api-key" + # OCIS_TRANSFER_SECRET: "some-ocis-transfer-secret" + # COLLABORATION_WOPIAPP_SECRET: "some-wopi-secret" + # IDM_SVC_PASSWORD: "some-ldap-idm-password" + # GRAPH_LDAP_BIND_PASSWORD: "some-ldap-idm-password" + # IDM_REVASVC_PASSWORD: "some-ldap-reva-password" + # GROUPS_LDAP_BIND_PASSWORD: "some-ldap-reva-password" + # USERS_LDAP_BIND_PASSWORD: "some-ldap-reva-password" + # AUTH_BASIC_LDAP_BIND_PASSWORD: "some-ldap-reva-password" + # IDM_IDPSVC_PASSWORD: "some-ldap-idp-password" + # IDP_LDAP_BIND_PASSWORD: "some-ldap-idp-password" + # GATEWAY_STORAGE_USERS_MOUNT_ID: "storage-users-1" + # STORAGE_USERS_MOUNT_ID: "storage-users-1" + # GRAPH_APPLICATION_ID: "application-1" + # OCIS_SERVICE_ACCOUNT_ID: "service-account-id" + # OCIS_SERVICE_ACCOUNT_SECRET: "service-account-secret" + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # + # - name: Build client + # run: | + # mkdir -p build + # cd build + # cmake -G"Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_TESTING=OFF -S .. + # ninja + # + # - name: Install Python Modules + # run: | + # export PATH=$PATH:/github/home/.local/bin + # make -C test/gui install + # python3.10 -m pip list -v + # + # - name: Create GUI test report directory + # run: | + # mkdir test/gui/guiReportUpload/screenshots -p + # chmod 777 test/gui -R + # + # - name: Wait for ocis service + # run: | + # echo "Waiting for ocis" + # # 150s timeout + # for i in {1..30}; do + # if curl -kfsSL https://ocis:9200 > /dev/null; then + # echo "ocis is up ✅" + # exit 0 + # fi + # echo "Retrying in 5s..." + # sleep 5 + # done + # echo "❌ ocis failed to start" && exit 1 + # + # - name: Run GUI test + # id: run_gui_test + # env: + # LICENSEKEY: ${{ secrets.SQUISH_LICENSEKEY }} + # GUI_TEST_REPORT_DIR: /__w/client/client/test/gui/guiReportUpload + # CLIENT_REPO: . + # OCIS_URL: https://ocis:9200 + # BACKEND_HOST: https://ocis:9200 + # SECURE_BACKEND_HOST: https://ocis:9200 + # OCIS: true + # SERVER_INI: test/gui/ci/server.ini + # SQUISH_PARAMETERS: > + # --testsuite test/gui + # --reportgen html,test/gui/guiReportUpload + # --envvar QT_LOGGING_RULES=sync.httplogger=true;gui.socketapi=false + # --tags ~@skip --tags ~@skipOnLinux --tags ~@skipOnOCIS + # ${{ + # !contains(github.event.pull_request.title, 'full-ci') + # && '--abortOnFail' || '' + # }} + # STACKTRACE_FILE: test/gui/guiReportUpload/stacktrace.log + # OWNCLOUD_CORE_DUMP: 1 + # RECORD_VIDEO_ON_FAILURE: false + # COREPACK_ENABLE_STRICT: 0 + # HOME: /home/headless + # run: bash /dockerstartup/entrypoint.sh + # + # - name: Upload GUI test result + # if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} + # run: | + # curl -L https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc + # chmod +x /tmp/mc + # /tmp/mc alias set cache ${{ env.S3_PUBLIC_CACHE_SERVER }} ${{ secrets.CACHE_PUBLIC_S3_ACCESS_KEY }} ${{ secrets.CACHE_PUBLIC_S3_SECRET_KEY }} + # /tmp/mc cp --recursive test/gui/guiReportUpload cache/${{ env.S3_PUBLIC_CACHE_BUCKET }}/${{ github.repository }}/${{ github.run_number }}/ocis + # + # - name: Log GUI reports + # if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} + # env: + # REPORT_DIR: /__w/client/client/test/gui/guiReportUpload + # SERVER_TYPE: ocis + # run: bash test/gui/ci/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE} - gui-tests: + gui-tests-oc10: runs-on: ubuntu-latest - container: - image: owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 - env: - PLAYWRIGHT_BROWSERS_PATH: /__w/client/client/test/gui/.playwright - GITHUB_REPO: ${{ github.repository }} - GITHUB_RUN_NUMBER: ${{ github.run_number }} + env: + PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright + GITHUB_REPO: ${{ github.repository }} + GITHUB_RUN_NUMBER: ${{ github.run_number }} + services: - ocis: - image: owncloud/ocis-rolling:latest - ports: - - 9200:9200 + mysql: + image: mysql:8.0 env: - OCIS_URL: https://ocis:9200 - OCIS_LOG_LEVEL: "error" - OCIS_LOG_PRETTY: "true" - OCIS_LOG_COLOR: "true" - OCIS_INSECURE: "true" - PROXY_ENABLE_BASIC_AUTH: "true" - OCIS_ADMIN_USER_ID: "some-admin-user-id-0000-000000000000" - IDM_ADMIN_PASSWORD: "admin" - OCIS_SYSTEM_USER_ID: "some-system-user-id-000-000000000000" - OCIS_SYSTEM_USER_API_KEY: "some-system-user-machine-auth-api-key" - OCIS_JWT_SECRET: "some-ocis-jwt-secret" - OCIS_MACHINE_AUTH_API_KEY: "some-ocis-machine-auth-api-key" - OCIS_TRANSFER_SECRET: "some-ocis-transfer-secret" - COLLABORATION_WOPIAPP_SECRET: "some-wopi-secret" - IDM_SVC_PASSWORD: "some-ldap-idm-password" - GRAPH_LDAP_BIND_PASSWORD: "some-ldap-idm-password" - IDM_REVASVC_PASSWORD: "some-ldap-reva-password" - GROUPS_LDAP_BIND_PASSWORD: "some-ldap-reva-password" - USERS_LDAP_BIND_PASSWORD: "some-ldap-reva-password" - AUTH_BASIC_LDAP_BIND_PASSWORD: "some-ldap-reva-password" - IDM_IDPSVC_PASSWORD: "some-ldap-idp-password" - IDP_LDAP_BIND_PASSWORD: "some-ldap-idp-password" - GATEWAY_STORAGE_USERS_MOUNT_ID: "storage-users-1" - STORAGE_USERS_MOUNT_ID: "storage-users-1" - GRAPH_APPLICATION_ID: "application-1" - OCIS_SERVICE_ACCOUNT_ID: "service-account-id" - OCIS_SERVICE_ACCOUNT_SECRET: "service-account-secret" + MYSQL_USER: owncloud + MYSQL_PASSWORD: owncloud + MYSQL_DATABASE: owncloud + MYSQL_ROOT_PASSWORD: owncloud steps: - name: Checkout uses: actions/checkout@v4 - name: Build client - run: | - mkdir -p build - cd build - cmake -G"Ninja" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -S .. - ninja + run: > + docker run + -v ${{ github.workspace }}:${{ github.workspace }} + -w ${{ github.workspace }} + --entrypoint bash + owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 + -c " + ls && + mkdir -p build && + cd build && + cmake -G\"Ninja\" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -S .. + ninja -j4 + " - - name: Install Python Modules - run: | - export PATH=$PATH:/github/home/.local/bin - make -C test/gui install - python3.10 -m pip list -v + - name: Start squish + env: + SKIP_TEST_RUN: true + run: > + docker run -d + --name squish + -v ${{ github.workspace }}:${{ github.workspace }} + -w ${{ github.workspace }} + --user 0:0 + owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 + + - name: Install Python modules + run: > + docker exec squish /bin/bash -c " + make -C test/gui -j2 install && + python3.10 -m pip list -v + " - name: Create GUI test report directory - run: | - mkdir test/gui/guiReportUpload/screenshots -p - chmod 777 test/gui -R + run: > + docker exec squish /bin/bash -c " + mkdir test/gui/guiReportUpload/screenshots -p + chmod 777 test/gui -R + " + + - name: setup apache service + run: > + docker run -d + --name owncloud + --network ${{ job.services.mysql.network }} + -v /__w/client/client/server:/var/www/html + -e APACHE_WEBROOT=/var/www/html + -e APACHE_CONFIG_TEMPLATE=ssl + -e APACHE_SSL_CERT_CN=server + -e APACHE_SSL_CERT=/tmp/server.crt + -e APACHE_SSL_KEY=/tmp/server.key + -e APACHE_LOGGING_PATH=/dev/null + owncloudci/php:7.4 + /bin/bash -c "cat /etc/apache2/templates/base >> /etc/apache2/templates/ssl && /usr/local/bin/apachectl -e debug -D FOREGROUND" - - name: Wait for ocis service + - name: Install core + run: > + docker run --rm + --network ${{ job.services.mysql.network }} + -v /__w/client/client/server:/var/www/html + -e PLUGIN_VERSION=latest + -e PLUGIN_CORE_PATH=/var/www/html + -e PLUGIN_DB_TYPE=mysql + -e PLUGIN_DB_NAME=owncloud + -e PLUGIN_DB_HOST=mysql + -e PLUGIN_DB_USERNAME=owncloud + -e PLUGIN_DB_USERNAME=owncloud + owncloudci/core + + - name: Setup server and app + run: > + docker exec owncloud bash -c " + cd /var/www/html && + php occ a:e testing && + php occ config:system:set trusted_domains 1 --value=owncloud && + php occ log:manage --level 2 && + php occ config:list && + php occ config:system:set skeletondirectory --value=/var/www/html/apps/testing/data/tinyskeleton && + php occ config:system:set sharing.federation.allowHttpFallback --value=true --type=bool + " + + - name: Install extra apps (oauth2 and activity) run: | - echo "Waiting for ocis" - # 150s timeout - for i in {1..30}; do - if curl -kfsSL https://ocis:9200 > /dev/null; then - echo "ocis is up ✅" - exit 0 + docker exec owncloud bash -c " + cd /var/www/html + # Install oauth2 + if [ ! -d apps/oauth2 ]; then + git clone --depth 1 https://github.com/owncloud/oauth2.git apps/oauth2 fi - echo "Retrying in 5s..." - sleep 5 - done - echo "❌ ocis failed to start" && exit 1 + cd apps/oauth2 && + make dist + cd /var/www/html + + # Install activity + if [ ! -d apps/activity ]; then + git clone --depth 1 https://github.com/owncloud/activity.git apps/activity + fi + cd apps/activity && + make dist + cd /var/www/html + php occ a:e activity + " + + - name: Fix permissions + run: | + docker exec owncloud bash -c " + cd /var/www/html && + chown -R www-data:www-data . + " + + - name: Owncloud log + run: docker exec -d owncloud tail -f /var/www/html/data/owncloud.log + +# - name: Build client +# run: > +# docker run +# -v ${{ github.workspace }}:${{ github.workspace }} +# -w ${{ github.workspace }} +# --entrypoint bash +# owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 +# -c " +# ls && +# mkdir -p build && +# cd build && +# cmake -G\"Ninja\" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -S .. +# ninja -j4 +# " +# +# - name: Start squish +# env: +# SKIP_TEST_RUN: true +# run: > +# docker run -d +# --name squish +# -v ${{ github.workspace }}:${{ github.workspace }} +# -w ${{ github.workspace }} +# --user 0:0 +# owncloudci/squish:fedora-42-8.1.0-qt68x-linux64 +# +# - name: Check memory (debug) +# run: free -h +# +# - name: Check container memory +# run: | +# docker exec squish cat /sys/fs/cgroup/memory.max || true +# docker exec squish free -h +# +# - name: Install Python modules +# run: > +# docker exec squish /bin/bash -c " +# make -C test/gui -j2 install && +# python3.10 -m pip list -v +# " +# +# - name: Create GUI test report directory +# run: > +# docker exec squish /bin/bash -c " +# mkdir test/gui/guiReportUpload/screenshots -p +# chmod 777 test/gui -R +# " - name: Run GUI test id: run_gui_test @@ -123,57 +346,60 @@ jobs: LICENSEKEY: ${{ secrets.SQUISH_LICENSEKEY }} GUI_TEST_REPORT_DIR: /__w/client/client/test/gui/guiReportUpload CLIENT_REPO: . - OCIS_URL: https://ocis:9200 - BACKEND_HOST: https://ocis:9200 - SECURE_BACKEND_HOST: https://ocis:9200 - OCIS: true + BACKEND_HOST: http://owncloud/ + SECURE_BACKEND_HOST: https://owncloud/ + OCIS: false SERVER_INI: test/gui/ci/server.ini - SQUISH_PARAMETERS: > + SQUISH_PATAMETERS: > --testsuite test/gui --reportgen html,test/gui/guiReportUpload --envvar QT_LOGGING_RULES=sync.httplogger=true;gui.socketapi=false - --tags ~@skip --tags ~@skipOnLinux --tags ~@skipOnOCIS - ${{ - !contains(github.event.pull_request.title, 'full-ci') - && '--abortOnFail' || '' + --tags ~@skip --tags ~@skipOnLinux --tags ~@skipOnOC10 + ${{ + !contains(github.event.pull_request.title, 'full_ci') + && '--abortOnFail' || '' }} STACKTRACE_FILE: test/gui/guiReportUpload/stacktrace.log OWNCLOUD_CORE_DUMP: 1 RECORD_VIDEO_ON_FAILURE: false COREPACK_ENABLE_STRICT: 0 HOME: /home/headless - run: bash /dockerstartup/entrypoint.sh - - - name: Upload GUI test result - if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} - run: | - curl -L https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc - chmod +x /tmp/mc - /tmp/mc alias set cache ${{ env.S3_PUBLIC_CACHE_SERVER }} ${{ secrets.CACHE_PUBLIC_S3_ACCESS_KEY }} ${{ secrets.CACHE_PUBLIC_S3_SECRET_KEY }} - /tmp/mc cp --recursive test/gui/guiReportUpload cache/${{ env.S3_PUBLIC_CACHE_BUCKET }}/${{ github.repository }}/${{ github.run_number }}/ocis - - - name: Log GUI reports - if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} - env: - REPORT_DIR: /__w/client/client/test/gui/guiReportUpload - SERVER_TYPE: ocis - run: bash test/gui/ci/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE} + SKIP_TEST_RUN: true + run: > + docker exec squish /bin/bash -c " + /dockerstartup/entrypoint.sh + " - notification: - needs: gui-tests - if: github.event_name == 'schedule' - runs-on: ubuntu-latest - container: - image: owncloudci/alpine:latest - steps: - - name: Checkout - uses: actions/checkout@v4 +# - name: Upload GUI test result +# if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} +# run: | +# curl -L https://dl.min.io/client/mc/release/linux-amd64/md -o /tmp/mc +# chmod +x /tmp/mc +# /tmp/mc alias set cache ${{ env.S3_PUBLIC_CACHE_SERVER }} ${{ secrets.CACHE_PUBLIC_S3_ACCESS_KEY }} ${{ secrets.CACHE_PUBLIC_S3_SECRET_KEY }} +# /tmp/mc cp --recursive test/gui/guiReportUpload cache/${{ env.S3_PUBLIC_CACHE_BUCKET }}/${{ github.repository }}/${{ github.run_number }}/oc10 +# +# - name: Log GUI reports +# if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }} +# env: +# REPORT_DIR: /__/w/client/client/test/gui/guiReportUpload +# SERVER_TYPE: oc10 +# run: bash test/gui/ci/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE} - - name: notify-matrix - env: - CACHE_ENDPOINT: ${{ env.S3_PUBLIC_CACHE_SERVER }} - CACHE_BUCKET: ${{ env.S3_PUBLIC_CACHE_BUCKET }} - MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }} - GITHUB_BUILD_STATUS: ${{ needs.gui-tests.result }} - COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }} - run: bash test/gui/ci/notification_template.sh . +# notification: +# needs: gui-tests +# if: github.event_name == 'schedule' +# runs-on: ubuntu-latest +# container: +# image: owncloudci/alpine:latest +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# +# - name: notify-matrix +# env: +# CACHE_ENDPOINT: ${{ env.S3_PUBLIC_CACHE_SERVER }} +# CACHE_BUCKET: ${{ env.S3_PUBLIC_CACHE_BUCKET }} +# MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }} +# GITHUB_BUILD_STATUS: ${{ needs.gui-tests.result }} +# COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }} +# run: bash test/gui/ci/notification_template.sh . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ba98a0ec00..aa483dde8a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,177 +1,177 @@ -name: ownCloud CI - -on: - push: - branches: - - master - - '[0-9]+' - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: {} - -defaults: - run: - shell: pwsh - -jobs: -# ------------------------------------------------------------------------------------------------------------------------------------------ - build: - permissions: - # actions/upload-artifact doesn't need contents: write - contents: read - strategy: - fail-fast: true - matrix: - include: - - name: windows-cl-x86_64 - target: windows-cl-msvc2022-x86_64 - os: windows-latest - container: - useSonarCloud: ${{ github.event_name != 'pull_request' }} - # TODO: align the target with the name - - name: macos-clang-arm64 - target: macos-clang-arm64 - os: macos-latest - container: - useSonarCloud: - - name: linux-gcc-x86_64 - target: linux-64-gcc - os: ubuntu-latest - container: owncloudci/appimage-build:sles15-amd64 - useSonarCloud: - name: ${{ matrix.name }} - - runs-on: ${{ matrix.os }} - - env: - CRAFT_TARGET: ${{ matrix.target }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - container: ${{ matrix.container }} - - steps: - - name: Check out full source code for tooling - if: ${{ matrix.useSonarCloud || matrix.name == 'linux-gcc-x86_64' }} - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Check out latest commit - if: ${{ !matrix.useSonarCloud && matrix.name != 'linux-gcc-x86_64' }} - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - if: matrix.name == 'windows-cl-x86_64' - with: - python-version: '3.12' - - - name: Restore cache - uses: actions/cache@v4 - with: - path: ~/cache - key: ${{ runner.os }}-${{ matrix.target }} - - - name: Clone CraftMaster - run: git clone --depth=1 https://invent.kde.org/kde/craftmaster.git "$env:HOME/craft/CraftMaster/CraftMaster" - - - name: Craft setup - run: | - New-Item -Path ~/cache -ItemType Directory -ErrorAction SilentlyContinue - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" --setup - - - name: Craft unshelve - run: | - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --unshelve "${env:GITHUB_WORKSPACE}/.craft.shelf" - - - name: Prepare - run: | - New-Item -ItemType Directory "${env:GITHUB_WORKSPACE}/binaries/" - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set forceAsserts=true owncloud/owncloud-client - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set srcDir="${env:GITHUB_WORKSPACE}" owncloud/owncloud-client - if ($IsWindows) { - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c dev-utils/nsis - } elseif($IsLinux) { - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c dev-utils/linuxdeploy - } - - - name: Install dependencies - run: | - if ("${{ matrix.target }}" -eq "linux-64-gcc" ) { - # build with appimage updater and others - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAppImageUpdater=true owncloud-client - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableCrashReporter=true owncloud/owncloud-client - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAutoUpdater=true owncloud/owncloud-client - } - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --install-deps owncloud/owncloud-client - - - name: QML format lint - if: matrix.name == 'linux-gcc-x86_64' - run: | - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c libs/qt6/qttools - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run pwsh -c "git ls-files *.qml | %{ qmlformat -i `$_}" - $diff = git diff - if ($diff) { - $diff - exit 1 - } - - - name: clang-format format lint - if: matrix.name == 'linux-gcc-x86_64' - run: | - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c libs/llvm - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run git clang-format --force ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} - $diff = git diff - if ($diff) { - $diff - exit 1 - } - - - name: Build - if: ${{ !matrix.useSonarCloud }} - run: | - if ("${{ matrix.target }}" -eq "linux-64-gcc" ) { - # build with appimage updater and others - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAppImageUpdater=true owncloud-client - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableCrashReporter=true owncloud/owncloud-client - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAutoUpdater=true owncloud/owncloud-client - } - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache owncloud/owncloud-client - - - name: Build for SonarCloud - if: ${{ matrix.useSonarCloud }} - run: | - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --configure owncloud/owncloud-client - $env:BUILD_DIR = $(& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --get buildDir -q owncloud-client) - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run pwsh "${env:GITHUB_WORKSPACE}/.github/workflows/.sonar.ps1" --build - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --install --qmerge owncloud/owncloud-client - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run pwsh "${env:GITHUB_WORKSPACE}/.github/workflows/.sonar.ps1" --analyze - - - name: Run tests - run: | - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --test owncloud/owncloud-client - - - name: Package - run: | - if ("${{ matrix.target }}" -eq "linux-64-gcc" ) { - # package without crash reporter - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableCrashReporter=false owncloud/owncloud-client - } - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --package owncloud/owncloud-client - - - name: Prepare artifacts - run: | - Copy-Item "$env:HOME/craft/binaries/*" "${env:GITHUB_WORKSPACE}/binaries/" -ErrorAction SilentlyContinue - & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --shelve "${env:GITHUB_WORKSPACE}/.craft.shelf" - Copy-Item "${env:GITHUB_WORKSPACE}/.craft.shelf" "${env:GITHUB_WORKSPACE}/binaries/" - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: ${{ github.workspace }}/binaries/* +#name: ownCloud CI +# +#on: +# push: +# branches: +# - master +# - '[0-9]+' +# pull_request: +# workflow_dispatch: +# +#concurrency: +# group: ${{ github.head_ref || github.run_id }} +# cancel-in-progress: true +# +#permissions: {} +# +#defaults: +# run: +# shell: pwsh +# +#jobs: +## ------------------------------------------------------------------------------------------------------------------------------------------ +# build: +# permissions: +# # actions/upload-artifact doesn't need contents: write +# contents: read +# strategy: +# fail-fast: true +# matrix: +# include: +# - name: windows-cl-x86_64 +# target: windows-cl-msvc2022-x86_64 +# os: windows-latest +# container: +# useSonarCloud: ${{ github.event_name != 'pull_request' }} +# # TODO: align the target with the name +# - name: macos-clang-arm64 +# target: macos-clang-arm64 +# os: macos-latest +# container: +# useSonarCloud: +# - name: linux-gcc-x86_64 +# target: linux-64-gcc +# os: ubuntu-latest +# container: owncloudci/appimage-build:sles15-amd64 +# useSonarCloud: +# name: ${{ matrix.name }} +# +# runs-on: ${{ matrix.os }} +# +# env: +# CRAFT_TARGET: ${{ matrix.target }} +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +# +# container: ${{ matrix.container }} +# +# steps: +# - name: Check out full source code for tooling +# if: ${{ matrix.useSonarCloud || matrix.name == 'linux-gcc-x86_64' }} +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# +# - name: Check out latest commit +# if: ${{ !matrix.useSonarCloud && matrix.name != 'linux-gcc-x86_64' }} +# uses: actions/checkout@v4 +# +# - uses: actions/setup-python@v5 +# if: matrix.name == 'windows-cl-x86_64' +# with: +# python-version: '3.12' +# +# - name: Restore cache +# uses: actions/cache@v4 +# with: +# path: ~/cache +# key: ${{ runner.os }}-${{ matrix.target }} +# +# - name: Clone CraftMaster +# run: git clone --depth=1 https://invent.kde.org/kde/craftmaster.git "$env:HOME/craft/CraftMaster/CraftMaster" +# +# - name: Craft setup +# run: | +# New-Item -Path ~/cache -ItemType Directory -ErrorAction SilentlyContinue +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" --setup +# +# - name: Craft unshelve +# run: | +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --unshelve "${env:GITHUB_WORKSPACE}/.craft.shelf" +# +# - name: Prepare +# run: | +# New-Item -ItemType Directory "${env:GITHUB_WORKSPACE}/binaries/" +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set forceAsserts=true owncloud/owncloud-client +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set srcDir="${env:GITHUB_WORKSPACE}" owncloud/owncloud-client +# if ($IsWindows) { +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c dev-utils/nsis +# } elseif($IsLinux) { +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c dev-utils/linuxdeploy +# } +# +# - name: Install dependencies +# run: | +# if ("${{ matrix.target }}" -eq "linux-64-gcc" ) { +# # build with appimage updater and others +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAppImageUpdater=true owncloud-client +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableCrashReporter=true owncloud/owncloud-client +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAutoUpdater=true owncloud/owncloud-client +# } +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --install-deps owncloud/owncloud-client +# +# - name: QML format lint +# if: matrix.name == 'linux-gcc-x86_64' +# run: | +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c libs/qt6/qttools +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run pwsh -c "git ls-files *.qml | %{ qmlformat -i `$_}" +# $diff = git diff +# if ($diff) { +# $diff +# exit 1 +# } +# +# - name: clang-format format lint +# if: matrix.name == 'linux-gcc-x86_64' +# run: | +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c libs/llvm +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run git clang-format --force ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} +# $diff = git diff +# if ($diff) { +# $diff +# exit 1 +# } +# +# - name: Build +# if: ${{ !matrix.useSonarCloud }} +# run: | +# if ("${{ matrix.target }}" -eq "linux-64-gcc" ) { +# # build with appimage updater and others +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAppImageUpdater=true owncloud-client +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableCrashReporter=true owncloud/owncloud-client +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableAutoUpdater=true owncloud/owncloud-client +# } +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache owncloud/owncloud-client +# +# - name: Build for SonarCloud +# if: ${{ matrix.useSonarCloud }} +# run: | +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --configure owncloud/owncloud-client +# $env:BUILD_DIR = $(& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --get buildDir -q owncloud-client) +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run pwsh "${env:GITHUB_WORKSPACE}/.github/workflows/.sonar.ps1" --build +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --install --qmerge owncloud/owncloud-client +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run pwsh "${env:GITHUB_WORKSPACE}/.github/workflows/.sonar.ps1" --analyze +# +# - name: Run tests +# run: | +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --test owncloud/owncloud-client +# +# - name: Package +# run: | +# if ("${{ matrix.target }}" -eq "linux-64-gcc" ) { +# # package without crash reporter +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set enableCrashReporter=false owncloud/owncloud-client +# } +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache --package owncloud/owncloud-client +# +# - name: Prepare artifacts +# run: | +# Copy-Item "$env:HOME/craft/binaries/*" "${env:GITHUB_WORKSPACE}/binaries/" -ErrorAction SilentlyContinue +# & "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --shelve "${env:GITHUB_WORKSPACE}/.craft.shelf" +# Copy-Item "${env:GITHUB_WORKSPACE}/.craft.shelf" "${env:GITHUB_WORKSPACE}/binaries/" +# +# - name: Upload artifacts +# uses: actions/upload-artifact@v4 +# with: +# name: ${{ matrix.name }} +# path: ${{ github.workspace }}/binaries/* diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4d56939858d..086aab177e6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,30 +1,30 @@ -name: "Close stale issues" -on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - -permissions: {} - -jobs: - stale: - permissions: - contents: write # only for delete-branch option - issues: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - debug-only: false - exempt-all-milestones: true - exempt-issue-labels: "blue-ticket, p1-urgent, p2-high, p3-medium, p4-low, QA:team" - days-before-stale: 30 - stale-issue-message: "This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days." - days-before-close: 7 - close-issue-message: "The issue was marked as stale for 7 days and closed automatically." - start-date: "2021-01-01T00:00:00Z" - close-issue-reason: not_planned - # do not close any PRs - only-pr-labels: "never-close-any-prs" +#name: "Close stale issues" +#on: +# schedule: +# - cron: "0 0 * * *" +# workflow_dispatch: +# +#permissions: {} +# +#jobs: +# stale: +# permissions: +# contents: write # only for delete-branch option +# issues: write +# pull-requests: write +# runs-on: ubuntu-latest +# steps: +# - uses: actions/stale@v9 +# with: +# repo-token: ${{ secrets.GITHUB_TOKEN }} +# debug-only: false +# exempt-all-milestones: true +# exempt-issue-labels: "blue-ticket, p1-urgent, p2-high, p3-medium, p4-low, QA:team" +# days-before-stale: 30 +# stale-issue-message: "This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days." +# days-before-close: 7 +# close-issue-message: "The issue was marked as stale for 7 days and closed automatically." +# start-date: "2021-01-01T00:00:00Z" +# close-issue-reason: not_planned +# # do not close any PRs +# only-pr-labels: "never-close-any-prs" diff --git a/.github/workflows/translate.yml b/.github/workflows/translate.yml index 272505d9b85..2141d879e15 100644 --- a/.github/workflows/translate.yml +++ b/.github/workflows/translate.yml @@ -1,58 +1,58 @@ -name: "Update translations" - -on: - workflow_dispatch: - -permissions: {} - -defaults: - run: - shell: pwsh - -jobs: - update-translations: - permissions: - # for git push - contents: write - runs-on: ubuntu-latest - - env: - TX_TOKEN: ${{ secrets.TX_TOKEN }} - - steps: - - uses: actions/checkout@v4 - with: - ssh-key: ${{ secrets.DEPLOYMENT_SSH_KEY }} - submodules: recursive - - - name: install-deps - run: sudo apt install -y qt6-l10n-tools - - - name: l10n-remove-old - run: | - rm translations/*.ts - git checkout translations/client_en.ts - - - name: l10n-read - run: /usr/lib/qt6/bin/lupdate src -no-obsolete -ts translations/client_en.ts - - - name: l10n-push-source - uses: transifex/cli-action@v2 - with: - token: ${{ secrets.TX_TOKEN }} - args: push -s --silent - - - name: fix-transifex-action - run: rm -rf /tmp/tx - - - name: l10n-pull - uses: transifex/cli-action@v2 - with: - token: ${{ secrets.TX_TOKEN }} - args: pull --force --all --silent - - - uses: GuillaumeFalourd/git-commit-push@v1.3 - with: - email: devops@owncloud.com - name: ownClouders - commit_message: "[tx] updated translations from transifex" +#name: "Update translations" +# +#on: +# workflow_dispatch: +# +#permissions: {} +# +#defaults: +# run: +# shell: pwsh +# +#jobs: +# update-translations: +# permissions: +# # for git push +# contents: write +# runs-on: ubuntu-latest +# +# env: +# TX_TOKEN: ${{ secrets.TX_TOKEN }} +# +# steps: +# - uses: actions/checkout@v4 +# with: +# ssh-key: ${{ secrets.DEPLOYMENT_SSH_KEY }} +# submodules: recursive +# +# - name: install-deps +# run: sudo apt install -y qt6-l10n-tools +# +# - name: l10n-remove-old +# run: | +# rm translations/*.ts +# git checkout translations/client_en.ts +# +# - name: l10n-read +# run: /usr/lib/qt6/bin/lupdate src -no-obsolete -ts translations/client_en.ts +# +# - name: l10n-push-source +# uses: transifex/cli-action@v2 +# with: +# token: ${{ secrets.TX_TOKEN }} +# args: push -s --silent +# +# - name: fix-transifex-action +# run: rm -rf /tmp/tx +# +# - name: l10n-pull +# uses: transifex/cli-action@v2 +# with: +# token: ${{ secrets.TX_TOKEN }} +# args: pull --force --all --silent +# +# - uses: GuillaumeFalourd/git-commit-push@v1.3 +# with: +# email: devops@owncloud.com +# name: ownClouders +# commit_message: "[tx] updated translations from transifex"