From f3eb4901bd7fbcc293460599419da021c7a66474 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 15:37:18 +0200 Subject: [PATCH 1/7] tests(CI)!: Drop Drone CI Signed-off-by: Joas Schilling --- .drone.jsonnet | 168 --- .drone.yml | 1533 -------------------------- tests/drone-run-acceptance-tests.sh | 23 - tests/drone-run-integration-tests.sh | 19 - tests/drone-run-php-tests.sh | 18 - 5 files changed, 1761 deletions(-) delete mode 100644 .drone.jsonnet delete mode 100644 .drone.yml delete mode 100755 tests/drone-run-acceptance-tests.sh delete mode 100755 tests/drone-run-integration-tests.sh delete mode 100755 tests/drone-run-php-tests.sh diff --git a/.drone.jsonnet b/.drone.jsonnet deleted file mode 100644 index d6b2bfbd958..00000000000 --- a/.drone.jsonnet +++ /dev/null @@ -1,168 +0,0 @@ -## 1. Download/install drone binary: -## curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx -## 2. Adjust the matrix as wished -## 3. Transform jsonnet to yml: -## ./drone jsonnet --stream --format yml -## 4. Export your drone token and the server: -## export DRONE_TOKEN=… export DRONE_SERVER=https://drone.nextcloud.com -## 5. Sign off the changes: -## ./drone sign nextcloud/spreed --save -## 6. Copy the new signature from .drone.yml to `hmac` field in this file -## 7. Transform jsonnet to yml again (to transfer the signature correctly): -## ./drone jsonnet --stream --format yml -## 8. Commit the result - -local Pipeline(test_set, database, services) = { - kind: "pipeline", - name: "int-"+database+"-"+test_set, - services: services, - steps: [ - { - name: "integration-"+test_set, - image: "ghcr.io/nextcloud/continuous-integration-php8.2:latest", - environment: { - APP_NAME: "spreed", - CORE_BRANCH: "master", - GUESTS_BRANCH: "master", - CSB_BRANCH: "main", - NOTIFICATIONS_BRANCH: "master", - DATABASEHOST: database - }, - commands: [ - "bash tests/drone-run-integration-tests.sh || exit 0", - "composer --version", - "composer self-update --2", - "wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh", - "bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST", - "cd ../server", - "cd apps/$APP_NAME", - "composer install --no-dev", - "cd ../..", - "./occ app:enable $APP_NAME", - "git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications", - "./occ app:enable --force notifications", - "git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests", - "./occ app:enable --force guests", - "git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot apps/call_summary_bot", - "./occ app:enable --force call_summary_bot", - "cd apps/$APP_NAME/tests/integration/", - "bash run.sh features/"+test_set - ] - } - ], - trigger: { - branch: [ - "master", - "stable*" - ], - event: ( - if database == "pgsql" then ["pull_request", "push"] else ["push"] - ) - } -}; - -local PipelineSQLite(test_set) = Pipeline( - test_set, - "sqlite", - [ - { - name: "cache", - image: "ghcr.io/nextcloud/continuous-integration-redis:latest" - } - ] -); - -local PipelineMySQL(test_set) = Pipeline( - test_set, - "mysql", - [ - { - name: "cache", - image: "ghcr.io/nextcloud/continuous-integration-redis:latest" - }, - { - name: "mysql", - image: "ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4", - environment: { - MYSQL_ROOT_PASSWORD: "owncloud", - MYSQL_USER: "oc_autotest", - MYSQL_PASSWORD: "owncloud", - MYSQL_DATABASE: "oc_autotest" - }, - command: [ - "--innodb_large_prefix=true", - "--innodb_file_format=barracuda", - "--innodb_file_per_table=true", - "--sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" - ], - tmpfs: [ - "/var/lib/mysql" - ] - } - ] -); - -local PipelinePostgreSQL(test_set) = Pipeline( - test_set, - "pgsql", - [ - { - name: "cache", - image: "ghcr.io/nextcloud/continuous-integration-redis:latest" - }, - { - name: "pgsql", - image: "ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13", - environment: { - POSTGRES_USER: "oc_autotest", - POSTGRES_DB: "oc_autotest", - POSTGRES_HOST_AUTH_METHOD: "trust", - POSTGRES_PASSWORD: "owncloud" - }, - tmpfs: [ - "/var/lib/postgresql/data" - ] - } - ] -); - - -[ - PipelineSQLite("callapi"), - PipelineSQLite("chat"), - PipelineSQLite("chat-2"), - PipelineSQLite("command"), - PipelineSQLite("conversation"), - PipelineSQLite("conversation-2"), - PipelineSQLite("federation"), - PipelineSQLite("integration"), - PipelineSQLite("sharing"), - PipelineSQLite("sharing-2"), - - PipelineMySQL("callapi"), - PipelineMySQL("chat"), - PipelineMySQL("chat-2"), - PipelineMySQL("command"), - PipelineMySQL("conversation"), - PipelineMySQL("conversation-2"), - PipelineMySQL("federation"), - PipelineMySQL("integration"), - PipelineMySQL("sharing"), - PipelineMySQL("sharing-2"), - - PipelinePostgreSQL("callapi"), - PipelinePostgreSQL("chat"), - PipelinePostgreSQL("chat-2"), - PipelinePostgreSQL("command"), - PipelinePostgreSQL("conversation"), - PipelinePostgreSQL("conversation-2"), - PipelinePostgreSQL("federation"), - PipelinePostgreSQL("integration"), - PipelinePostgreSQL("sharing"), - PipelinePostgreSQL("sharing-2"), - - { - kind: "signature", - hmac: "1f1f7e889531624fec63e4fa8b65abaa737acac57dd7aa01df34f40027fdef12" - }, -] diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 84968aa7656..00000000000 --- a/.drone.yml +++ /dev/null @@ -1,1533 +0,0 @@ ---- -kind: pipeline -name: int-sqlite-callapi -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/callapi - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-callapi -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-chat -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/chat - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-chat -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-chat-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/chat-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-chat-2 -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-command -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/command - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-command -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-conversation -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/conversation - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-conversation -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-conversation-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/conversation-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-conversation-2 -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-federation -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/federation - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-federation -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-integration -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/integration - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-integration -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-sharing -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/sharing - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-sharing -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-sqlite-sharing-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/sharing-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: sqlite - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-sharing-2 -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-callapi -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/callapi - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-callapi -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-chat -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/chat - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-chat -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-chat-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/chat-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-chat-2 -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-command -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/command - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-command -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-conversation -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/conversation - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-conversation -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-conversation-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/conversation-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-conversation-2 -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-federation -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/federation - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-federation -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-integration -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/integration - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-integration -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-sharing -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/sharing - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-sharing -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-mysql-sharing-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- command: - - --innodb_large_prefix=true - - --innodb_file_format=barracuda - - --innodb_file_per_table=true - - --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION - environment: - MYSQL_DATABASE: oc_autotest - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4 - name: mysql - tmpfs: - - /var/lib/mysql -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/sharing-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: mysql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-sharing-2 -trigger: - branch: - - master - - stable* - event: - - push ---- -kind: pipeline -name: int-pgsql-callapi -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/callapi - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-callapi -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-chat -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/chat - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-chat -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-chat-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/chat-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-chat-2 -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-command -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/command - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-command -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-conversation -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/conversation - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-conversation -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-conversation-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/conversation-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-conversation-2 -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-federation -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/federation - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-federation -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-integration -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/integration - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-integration -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-sharing -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/sharing - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-sharing -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -kind: pipeline -name: int-pgsql-sharing-2 -services: -- image: ghcr.io/nextcloud/continuous-integration-redis:latest - name: cache -- environment: - POSTGRES_DB: oc_autotest - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_PASSWORD: owncloud - POSTGRES_USER: oc_autotest - image: ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13 - name: pgsql - tmpfs: - - /var/lib/postgresql/data -steps: -- commands: - - bash tests/drone-run-integration-tests.sh || exit 0 - - composer --version - - composer self-update --2 - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST - - cd ../server - - cd apps/$APP_NAME - - composer install --no-dev - - cd ../.. - - ./occ app:enable $APP_NAME - - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications - apps/notifications - - ./occ app:enable --force notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - - ./occ app:enable --force guests - - git clone --depth 1 -b $CSB_BRANCH https://github.com/nextcloud/call_summary_bot - apps/call_summary_bot - - ./occ app:enable --force call_summary_bot - - cd apps/$APP_NAME/tests/integration/ - - bash run.sh features/sharing-2 - environment: - APP_NAME: spreed - CORE_BRANCH: master - CSB_BRANCH: main - DATABASEHOST: pgsql - GUESTS_BRANCH: master - NOTIFICATIONS_BRANCH: master - image: ghcr.io/nextcloud/continuous-integration-php8.2:latest - name: integration-sharing-2 -trigger: - branch: - - master - - stable* - event: - - pull_request - - push ---- -hmac: 1f1f7e889531624fec63e4fa8b65abaa737acac57dd7aa01df34f40027fdef12 -kind: signature diff --git a/tests/drone-run-acceptance-tests.sh b/tests/drone-run-acceptance-tests.sh deleted file mode 100755 index beec7f6efcc..00000000000 --- a/tests/drone-run-acceptance-tests.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -echo "=========================" -echo "= List of changed files =" -echo "=========================" -git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA -echo "=========================" - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | wc -l) -eq 0 ]] && echo "No files are modified => merge commit" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "\.drone\.yml") -gt 0 ]] && echo ".drone.yml is modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "appinfo/info\.xml") -gt 0 ]] && echo "info.xml is modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep --invert-match "^tests/" | grep -c ".php$") -gt 0 ]] && echo "PHP files are modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^tests/acceptance/") -gt 0 ]] && echo "Acceptance test files are modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^js/") -gt 0 ]] && echo "JS files are modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^css/") -gt 0 ]] && echo "CSS files are modified" && exit 0 - -exit 1 diff --git a/tests/drone-run-integration-tests.sh b/tests/drone-run-integration-tests.sh deleted file mode 100755 index d92737e97f0..00000000000 --- a/tests/drone-run-integration-tests.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -echo "=========================" -echo "= List of changed files =" -echo "=========================" -git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA -echo "=========================" - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | wc -l) -eq 0 ]] && echo "No files are modified => merge commit" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c '^\.drone\.yml$') -gt 0 ]] && echo ".drone.yml is modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "appinfo/info\.xml") -gt 0 ]] && echo "info.xml is modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep --invert-match "^tests/" | grep -c ".php$") -gt 0 ]] && echo "PHP files are modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^tests/integration/") -gt 0 ]] && echo "Integration test files are modified" && exit 0 - -exit 1 diff --git a/tests/drone-run-php-tests.sh b/tests/drone-run-php-tests.sh deleted file mode 100755 index f6af87f2acb..00000000000 --- a/tests/drone-run-php-tests.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -echo "=========================" -echo "= List of changed files =" -echo "=========================" -git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA -echo "=========================" - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | wc -l) -eq 0 ]] && echo "No files are modified => merge commit" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c '^\.drone\.yml$') -gt 0 ]] && echo ".drone.yml is modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "appinfo/info\.xml") -gt 0 ]] && echo "info.xml is modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep --invert-match "^tests/" | grep -c ".php$") -gt 0 ]] && echo "PHP files are modified" && exit 0 - -[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^tests/php/") -gt 0 ]] && echo "PHP test files are modified" && exit 0 - -exit 1 From ce7438071c54accf49cc7a7e30b0b625b5e3cdfa Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 15:51:30 +0200 Subject: [PATCH 2/7] feat(CI): Run integration test on GA Signed-off-by: Joas Schilling --- .github/workflows/integration-mysql.yml | 143 ++++++++++++++++ .github/workflows/integration-oci.yml | 155 ++++++++++++++++++ .github/workflows/integration-pgsql.yml | 153 +++++++++++++++++ .github/workflows/integration-sqlite.yml | 134 +++++++++++++++ .../integration-summary-when-unrelated.yml | 68 ++++++++ 5 files changed, 653 insertions(+) create mode 100644 .github/workflows/integration-mysql.yml create mode 100644 .github/workflows/integration-oci.yml create mode 100644 .github/workflows/integration-pgsql.yml create mode 100644 .github/workflows/integration-sqlite.yml create mode 100644 .github/workflows/integration-summary-when-unrelated.yml diff --git a/.github/workflows/integration-mysql.yml b/.github/workflows/integration-mysql.yml new file mode 100644 index 00000000000..b28c4e5b015 --- /dev/null +++ b/.github/workflows/integration-mysql.yml @@ -0,0 +1,143 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Integration mysql + +on: + pull_request: + paths: + # Only running on PR for this file to save CI time (otherwise pgsql only) + - '.github/workflows/integration-mysql.yml' + + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: integration-mysql-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + integration-mysql: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + test-suite: ['callapi', 'chat', 'chat-2', 'command', 'conversation', 'conversation-2', 'federation', 'integration', 'sharing', 'sharing-2'] + php-versions: ['8.2'] + server-versions: ['master'] + guests-versions: ['master'] + call-summary-bot-versions: ['main'] + notifications-versions: ['master'] + + services: + mysql: + image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest + ports: + - 4444:3306/tcp + env: + MYSQL_ROOT_PASSWORD: rootpassword + options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + path: apps/${{ env.APP_NAME }} + + - name: Checkout call_summary_bot app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/call_summary_bot + path: apps/call_summary_bot + ref: ${{ matrix.call-summary-bot-versions }} + + - name: Checkout guests app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/guests + path: apps/guests + ref: ${{ matrix.guests-versions }} + + - name: Checkout notifications app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/notifications + path: apps/notifications + ref: ${{ matrix.notifications-versions }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + with: + php-version: ${{ matrix.php-versions }} + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql + coverage: none + ini-file: development + ini-values: + apc.enable_cli=on + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up production dependencies + working-directory: apps/${{ env.APP_NAME }} + run: composer i --no-dev + + - name: Set up behat dependencies + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php + ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable --force call_summary_bot + ./occ app:enable --force guests + ./occ app:enable --force notifications + + - name: Run integration + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: bash run.sh features/${{ matrix.test-suite }} + + - name: Print logs + if: always() + run: | + cat data/nextcloud.log + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: integration-mysql + + if: always() + + name: integration-mysql-summary + + steps: + - name: Summary status + run: if ${{ needs.integration-mysql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-oci.yml b/.github/workflows/integration-oci.yml new file mode 100644 index 00000000000..297e0477b71 --- /dev/null +++ b/.github/workflows/integration-oci.yml @@ -0,0 +1,155 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Integration oci + +on: + pull_request: + paths: + # Only running on PR for this file to save CI time (otherwise pgsql only) + - '.github/workflows/integration-oci.yml' + + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: integration-oci-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + integration-oci: + runs-on: ubuntu-22.04 + + strategy: + fail-fast: false + matrix: + test-suite: ['callapi', 'chat', 'chat-2', 'command', 'conversation', 'conversation-2', 'federation', 'integration', 'sharing', 'sharing-2'] + php-versions: ['8.2'] + server-versions: ['master'] + guests-versions: ['master'] + call-summary-bot-versions: ['main'] + notifications-versions: ['master'] + + services: + oracle: + image: ghcr.io/gvenzl/oracle-xe:11 + + # Provide passwords and other environment variables to container + env: + ORACLE_RANDOM_PASSWORD: true + APP_USER: autotest + APP_USER_PASSWORD: owncloud + + # Forward Oracle port + ports: + - 1521:1521/tcp + + # Provide healthcheck script options for startup + options: >- + --health-cmd healthcheck.sh + --health-interval 10s + --health-timeout 5s + --health-retries 10 + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + path: apps/${{ env.APP_NAME }} + + - name: Checkout call_summary_bot app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/call_summary_bot + path: apps/call_summary_bot + ref: ${{ matrix.call-summary-bot-versions }} + + - name: Checkout guests app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/guests + path: apps/guests + ref: ${{ matrix.guests-versions }} + + - name: Checkout notifications app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/notifications + path: apps/notifications + ref: ${{ matrix.notifications-versions }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + with: + php-version: ${{ matrix.php-versions }} + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8 + coverage: none + ini-file: development + ini-values: + apc.enable_cli=on + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up production dependencies + working-directory: apps/${{ env.APP_NAME }} + run: composer i --no-dev + + - name: Set up behat dependencies + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 1521 + run: | + mkdir data + echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php + ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin + ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable --force call_summary_bot + ./occ app:enable --force guests + ./occ app:enable --force notifications + + - name: Run integration + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: bash run.sh features/${{ matrix.test-suite }} + + - name: Print logs + if: always() + run: | + cat data/nextcloud.log + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: integration-oci + + if: always() + + name: integration-oci-summary + + steps: + - name: Summary status + run: if ${{ needs.integration-oci.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-pgsql.yml b/.github/workflows/integration-pgsql.yml new file mode 100644 index 00000000000..77b7fb13776 --- /dev/null +++ b/.github/workflows/integration-pgsql.yml @@ -0,0 +1,153 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Integration pgsql + +on: + pull_request: + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/integration/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: integration-pgsql-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + integration-pgsql: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + test-suite: ['callapi', 'chat', 'chat-2', 'command', 'conversation', 'conversation-2', 'federation', 'integration', 'sharing', 'sharing-2'] + php-versions: ['8.2'] + server-versions: ['master'] + guests-versions: ['master'] + call-summary-bot-versions: ['main'] + notifications-versions: ['master'] + + services: + postgres: + image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest + ports: + - 4444:5432/tcp + env: + POSTGRES_USER: root + POSTGRES_PASSWORD: rootpassword + POSTGRES_DB: nextcloud + options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5 + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + path: apps/${{ env.APP_NAME }} + + - name: Checkout call_summary_bot app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/call_summary_bot + path: apps/call_summary_bot + ref: ${{ matrix.call-summary-bot-versions }} + + - name: Checkout guests app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/guests + path: apps/guests + ref: ${{ matrix.guests-versions }} + + - name: Checkout notifications app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/notifications + path: apps/notifications + ref: ${{ matrix.notifications-versions }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + with: + php-version: ${{ matrix.php-versions }} + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql + coverage: none + ini-file: development + ini-values: + apc.enable_cli=on + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up production dependencies + working-directory: apps/${{ env.APP_NAME }} + run: composer i --no-dev + + - name: Set up behat dependencies + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php + ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable --force call_summary_bot + ./occ app:enable --force guests + ./occ app:enable --force notifications + + - name: Run integration + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: bash run.sh features/${{ matrix.test-suite }} + + - name: Print logs + if: always() + run: | + cat data/nextcloud.log + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: integration-pgsql + + if: always() + + name: integration-pgsql-summary + + steps: + - name: Summary status + run: if ${{ needs.integration-pgsql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml new file mode 100644 index 00000000000..cfbf8db1523 --- /dev/null +++ b/.github/workflows/integration-sqlite.yml @@ -0,0 +1,134 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Integration sqlite + +on: + pull_request: + paths: + # Only running on PR for this file to save CI time (otherwise pgsql only) + - '.github/workflows/integration-sqlite.yml' + + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: integration-sqlite-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + integration-sqlite: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + test-suite: ['callapi', 'chat', 'chat-2', 'command', 'conversation', 'conversation-2', 'federation', 'integration', 'sharing', 'sharing-2'] + php-versions: ['8.2'] + server-versions: ['master'] + guests-versions: ['master'] + call-summary-bot-versions: ['main'] + notifications-versions: ['master'] + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + path: apps/${{ env.APP_NAME }} + + - name: Checkout call_summary_bot app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/call_summary_bot + path: apps/call_summary_bot + ref: ${{ matrix.call-summary-bot-versions }} + + - name: Checkout guests app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/guests + path: apps/guests + ref: ${{ matrix.guests-versions }} + + - name: Checkout notifications app + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/notifications + path: apps/notifications + ref: ${{ matrix.notifications-versions }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + with: + php-version: ${{ matrix.php-versions }} + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite + coverage: none + ini-file: development + ini-values: + apc.enable_cli=on + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up production dependencies + working-directory: apps/${{ env.APP_NAME }} + run: composer i --no-dev + + - name: Set up behat dependencies + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable --force call_summary_bot + ./occ app:enable --force guests + ./occ app:enable --force notifications + + - name: Run integration + working-directory: apps/${{ env.APP_NAME }}/tests/integration + run: bash run.sh features/${{ matrix.test-suite }} + + - name: Print logs + if: always() + run: | + cat data/nextcloud.log + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: integration-sqlite + + if: always() + + name: integration-sqlite-summary + + steps: + - name: Summary status + run: if ${{ needs.integration-sqlite.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/integration-summary-when-unrelated.yml b/.github/workflows/integration-summary-when-unrelated.yml new file mode 100644 index 00000000000..f6c7aadaa7a --- /dev/null +++ b/.github/workflows/integration-summary-when-unrelated.yml @@ -0,0 +1,68 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Integration summary + +on: + pull_request: + paths-ignore: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/integration/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + +permissions: + contents: read + +jobs: + summary-mysql: + permissions: + contents: none + runs-on: ubuntu-latest + + name: integration-mysql-summary + + steps: + - name: Summary status + run: 'echo "No PHP files changed, skipped Integration tests"' + + summary-oci: + permissions: + contents: none + runs-on: ubuntu-latest + + name: integration-oci-summary + + steps: + - name: Summary status + run: 'echo "No PHP files changed, skipped Integration tests"' + + summary-pgsql: + permissions: + contents: none + runs-on: ubuntu-latest + + name: integration-pgsql-summary + + steps: + - name: Summary status + run: 'echo "No PHP files changed, skipped Integration tests"' + + summary-sqlite: + permissions: + contents: none + runs-on: ubuntu-latest + + name: integration-sqlite-summary + + steps: + - name: Summary status + run: 'echo "No PHP files changed, skipped Integration tests"' From 15df283dc2a154f75fefe6badcdc7c1f84305428 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 18:04:58 +0200 Subject: [PATCH 3/7] fix(CI): Currently work without APCu as some tests fail otherwise Signed-off-by: Joas Schilling --- .github/workflows/integration-mysql.yml | 5 +---- .github/workflows/integration-oci.yml | 5 +---- .github/workflows/integration-pgsql.yml | 5 +---- .github/workflows/integration-sqlite.yml | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/integration-mysql.yml b/.github/workflows/integration-mysql.yml index b28c4e5b015..4349fd9acc8 100644 --- a/.github/workflows/integration-mysql.yml +++ b/.github/workflows/integration-mysql.yml @@ -91,11 +91,9 @@ jobs: with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation - extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql coverage: none ini-file: development - ini-values: - apc.enable_cli=on env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -112,7 +110,6 @@ jobs: DB_PORT: 4444 run: | mkdir data - echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot diff --git a/.github/workflows/integration-oci.yml b/.github/workflows/integration-oci.yml index 297e0477b71..e7f360048a0 100644 --- a/.github/workflows/integration-oci.yml +++ b/.github/workflows/integration-oci.yml @@ -103,11 +103,9 @@ jobs: with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation - extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8 + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8 coverage: none ini-file: development - ini-values: - apc.enable_cli=on env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -124,7 +122,6 @@ jobs: DB_PORT: 1521 run: | mkdir data - echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot diff --git a/.github/workflows/integration-pgsql.yml b/.github/workflows/integration-pgsql.yml index 77b7fb13776..db14d97bd24 100644 --- a/.github/workflows/integration-pgsql.yml +++ b/.github/workflows/integration-pgsql.yml @@ -101,11 +101,9 @@ jobs: with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation - extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql coverage: none ini-file: development - ini-values: - apc.enable_cli=on env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -122,7 +120,6 @@ jobs: DB_PORT: 4444 run: | mkdir data - echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml index cfbf8db1523..36764d7e72f 100644 --- a/.github/workflows/integration-sqlite.yml +++ b/.github/workflows/integration-sqlite.yml @@ -82,11 +82,9 @@ jobs: with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation - extensions: bz2, ctype, curl, dom, fileinfo, gd, apcu, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none ini-file: development - ini-values: - apc.enable_cli=on env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -103,7 +101,6 @@ jobs: DB_PORT: 4444 run: | mkdir data - echo '"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot From 4573327f5b20cb39d5ad6cc1f0c955288dec31ec Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 21:32:09 +0200 Subject: [PATCH 4/7] fix(CI): Make bruteforce test pass with IPv4 and IPv6 Signed-off-by: Joas Schilling --- .../features/bootstrap/FeatureContext.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 6db7b178456..76dc4e3fdd7 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -3053,6 +3053,8 @@ public function enableDisableBruteForceProtection(string $enable): void { // Reset the attempts before disabling $this->runOcc(['security:bruteforce:reset', '127.0.0.1']); $this->theCommandWasSuccessful(); + $this->runOcc(['security:bruteforce:reset', '::1']); + $this->theCommandWasSuccessful(); } // config:system:get auth.bruteforce.protection.enabled @@ -3071,6 +3073,8 @@ public function enableDisableBruteForceProtection(string $enable): void { // Reset the attempts after enabling $this->runOcc(['security:bruteforce:reset', '127.0.0.1']); $this->theCommandWasSuccessful(); + $this->runOcc(['security:bruteforce:reset', '::1']); + $this->theCommandWasSuccessful(); } } @@ -3084,17 +3088,30 @@ public function assertBruteforceAttempts(TableNode $tableNode = null): void { $this->runOcc(['security:bruteforce:attempts', '127.0.0.1', $action, '--output=json']); $this->theCommandWasSuccessful(); $info = json_decode($this->getLastStdOut(), true); + $totalCount += $info['attempts']; + $ipv4Attempts = $info['attempts']; - Assert::assertEquals($attempts, $info['attempts']); + $this->runOcc(['security:bruteforce:attempts', '::1', $action, '--output=json']); + $this->theCommandWasSuccessful(); + $info = json_decode($this->getLastStdOut(), true); $totalCount += $info['attempts']; + $ipv6Attempts = $info['attempts']; + + Assert::assertEquals($attempts, $ipv4Attempts + $ipv6Attempts); } } $this->runOcc(['security:bruteforce:attempts', '127.0.0.1', '--output=json']); $this->theCommandWasSuccessful(); $info = json_decode($this->getLastStdOut(), true); + $ipv4Attempts = $info['attempts']; + + $this->runOcc(['security:bruteforce:attempts', '::1', '--output=json']); + $this->theCommandWasSuccessful(); + $info = json_decode($this->getLastStdOut(), true); + $ipv6Attempts = $info['attempts']; - Assert::assertEquals($totalCount, $info['attempts'], 'IP has bruteforce attempts for other actions registered'); + Assert::assertEquals($totalCount, $ipv4Attempts + $ipv6Attempts, 'IP has bruteforce attempts for other actions registered'); } /** From a6a1b24a8f4162e74a683dbfe4844e71ccf9dfd2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 21:57:38 +0200 Subject: [PATCH 5/7] fix(CI): Clean up Context files Signed-off-by: Joas Schilling --- tests/integration/config/behat.yml | 7 +- .../features/bootstrap/FeatureContext.php | 95 ++++++++----------- .../features/bootstrap/FederationContext.php | 39 +------- .../features/bootstrap/SharingContext.php | 20 ++-- 4 files changed, 50 insertions(+), 111 deletions(-) diff --git a/tests/integration/config/behat.yml b/tests/integration/config/behat.yml index 25ae8de49ec..f82ca24f373 100644 --- a/tests/integration/config/behat.yml +++ b/tests/integration/config/behat.yml @@ -7,12 +7,7 @@ default: - '%paths.base%/../features' contexts: - FeatureContext - - FederationContext: - baseUrl: http://localhost:8080/ - admin: - - admin - - admin - regularUserPassword: 123456 + - FederationContext - SharingContext: baseUrl: http://localhost:8080/ admin: diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 76dc4e3fdd7..21fb9eddafd 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -37,44 +37,41 @@ class FeatureContext implements Context, SnippetAcceptingContext { public const TEST_PASSWORD = '123456'; - /** @var string[] */ - protected static $identifierToToken; - /** @var string[] */ - protected static $identifierToId; - /** @var string[] */ - protected static $tokenToIdentifier; - /** @var array[] */ - protected static $identifierToAvatar; - /** @var string[] */ - protected static $sessionIdToUser; - /** @var string[] */ - protected static $userToSessionId; - /** @var int[] */ - protected static $userToAttendeeId; - /** @var string[] */ - protected static $messages; - protected static $textToMessageId; - /** @var array[] */ - protected static $messageIdToText; - /** @var int[] */ - protected static $remoteToInviteId; - /** @var string[] */ - protected static $inviteIdToRemote; - /** @var int[] */ - protected static $questionToPollId; + /** @var array */ + protected static array $identifierToToken; + /** @var array */ + protected static array $identifierToId; + /** @var array */ + protected static array $tokenToIdentifier; + /** @var array */ + protected static array $sessionIdToUser; + /** @var array */ + protected static array $userToSessionId; + /** @var array */ + protected static array $userToAttendeeId; + /** @var array */ + protected static array $textToMessageId; + /** @var array */ + protected static array $messageIdToText; + /** @var array */ + protected static array $remoteToInviteId; + /** @var array */ + protected static array $inviteIdToRemote; + /** @var array */ + protected static array $questionToPollId; /** @var array[] */ - protected static $lastNotifications; + protected static array $lastNotifications; /** @var array */ - protected static $botIdToName; + protected static array $botIdToName; /** @var array */ - protected static $botNameToId; + protected static array $botNameToId; /** @var array */ - protected static $botNameToHash; + protected static array $botNameToHash; /** @var array|null */ protected static ?array $nextChatRequestParameters = null; - protected static $permissionsMap = [ + protected static array $permissionsMap = [ 'D' => 0, // PERMISSIONS_DEFAULT 'C' => 1, // PERMISSIONS_CUSTOM 'S' => 2, // PERMISSIONS_CALL_START @@ -86,41 +83,34 @@ class FeatureContext implements Context, SnippetAcceptingContext { 'M' => 128, // PERMISSIONS_CHAT ]; - /** @var string */ - protected $currentUser; + protected ?string $currentUser = ''; - /** @var ResponseInterface */ - private $response; + private ?ResponseInterface $response; /** @var CookieJar[] */ - private $cookieJars; + private array $cookieJars; - /** @var string */ - protected $baseUrl; + protected string $baseUrl; - /** @var string */ - protected $baseRemoteUrl; + protected string $baseRemoteUrl; - /** @var array */ - protected $createdUsers = []; + /** @var string[] */ + protected array $createdUsers = []; - /** @var array */ - protected $createdGroups = []; + /** @var string[] */ + protected array $createdGroups = []; - /** @var array */ - protected $createdGuestAccountUsers = []; + /** @var string[] */ + protected array $createdGuestAccountUsers = []; /** @var array */ - protected $changedConfigs = []; + protected array $changedConfigs = []; - /** @var SharingContext */ - private $sharingContext; + private ?SharingContext $sharingContext; - /** @var null|bool */ - private $guestsAppWasEnabled = null; + private ?bool $guestsAppWasEnabled = null; - /** @var string */ - private $guestsOldWhitelist; + private string $guestsOldWhitelist; use CommandLineTrait; use RecordingTrait; @@ -152,7 +142,6 @@ public function __construct() { $this->cookieJars = []; $this->baseUrl = getenv('TEST_SERVER_URL'); $this->baseRemoteUrl = getenv('TEST_REMOTE_URL'); - $this->guestsAppWasEnabled = null; } /** diff --git a/tests/integration/features/bootstrap/FederationContext.php b/tests/integration/features/bootstrap/FederationContext.php index 95c0b0aeaaf..880c61e030f 100644 --- a/tests/integration/features/bootstrap/FederationContext.php +++ b/tests/integration/features/bootstrap/FederationContext.php @@ -35,44 +35,7 @@ * Federation context. */ class FederationContext implements Context, SnippetAcceptingContext { - /** @var string */ - private $baseUrl = ''; - /** @var string */ - private $baseRemoteUrl = ''; - - /** @var ResponseInterface */ - private $response = null; - - /** @var string */ - private $currentUser = ''; - - /** @var string */ - private $regularUserPassword; - - /** @var \SimpleXMLElement */ - private $lastCreatedShareData = null; - - public function __construct(string $baseUrl, array $admin, string $regularUserPassword) { - $this->baseUrl = $baseUrl; - $this->adminUser = $admin; - $this->regularUserPassword = $regularUserPassword; - - // in case of ci deployment we take the server url from the environment - $testServerUrl = getenv('TEST_SERVER_URL'); - if ($testServerUrl !== false) { - $this->baseUrl = $testServerUrl; - } - $testServerUrl = getenv('TEST_REMOTE_URL'); - if ($testServerUrl !== false) { - $this->baseRemoteUrl = $testServerUrl; - } - } - - /** @var string */ - private static $phpFederatedServerPid = ''; - - /** @var string */ - private $lastAcceptedRemoteShareId; + private static string $phpFederatedServerPid = ''; /** * @BeforeScenario diff --git a/tests/integration/features/bootstrap/SharingContext.php b/tests/integration/features/bootstrap/SharingContext.php index a45c86dbd05..151c25b6296 100644 --- a/tests/integration/features/bootstrap/SharingContext.php +++ b/tests/integration/features/bootstrap/SharingContext.php @@ -28,20 +28,12 @@ use Psr\Http\Message\ResponseInterface; class SharingContext implements Context { - /** @var string */ - private $baseUrl = ''; - - /** @var ResponseInterface */ - private $response = null; - - /** @var string */ - private $currentUser = ''; - - /** @var string */ - private $regularUserPassword; - - /** @var \SimpleXMLElement */ - private $lastCreatedShareData = null; + private string $baseUrl; + private ?ResponseInterface $response = null; + private string $currentUser = ''; + private array $adminUser; + private string $regularUserPassword; + private ?\SimpleXMLElement $lastCreatedShareData = null; public function __construct(string $baseUrl, array $admin, string $regularUserPassword) { $this->baseUrl = $baseUrl; From bcdeacea1ae526114a845c32c4f3f09026802c7d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 22:37:02 +0200 Subject: [PATCH 6/7] performance(CI): Use faster password hash on CI Signed-off-by: Joas Schilling --- .github/workflows/integration-mysql.yml | 1 + .github/workflows/integration-oci.yml | 1 + .github/workflows/integration-pgsql.yml | 1 + .github/workflows/integration-sqlite.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/integration-mysql.yml b/.github/workflows/integration-mysql.yml index 4349fd9acc8..ca4ffb3f719 100644 --- a/.github/workflows/integration-mysql.yml +++ b/.github/workflows/integration-mysql.yml @@ -111,6 +111,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./occ config:system:set hashing_default_password --value=true --type=boolean ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot ./occ app:enable --force guests diff --git a/.github/workflows/integration-oci.yml b/.github/workflows/integration-oci.yml index e7f360048a0..4c41b23fdb1 100644 --- a/.github/workflows/integration-oci.yml +++ b/.github/workflows/integration-oci.yml @@ -123,6 +123,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin + ./occ config:system:set hashing_default_password --value=true --type=boolean ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot ./occ app:enable --force guests diff --git a/.github/workflows/integration-pgsql.yml b/.github/workflows/integration-pgsql.yml index db14d97bd24..a8aafb0439b 100644 --- a/.github/workflows/integration-pgsql.yml +++ b/.github/workflows/integration-pgsql.yml @@ -121,6 +121,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./occ config:system:set hashing_default_password --value=true --type=boolean ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot ./occ app:enable --force guests diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml index 36764d7e72f..9f5bd54f0fc 100644 --- a/.github/workflows/integration-sqlite.yml +++ b/.github/workflows/integration-sqlite.yml @@ -102,6 +102,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./occ config:system:set hashing_default_password --value=true --type=boolean ./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force call_summary_bot ./occ app:enable --force guests From a2f7ff1c09a125549d216bf50f73d31327079883 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Aug 2023 23:21:17 +0200 Subject: [PATCH 7/7] Fix(commands): Fix commands for Oracle Signed-off-by: Joas Schilling --- lib/Chat/Command/Executor.php | 6 +++--- lib/Service/CommandService.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Chat/Command/Executor.php b/lib/Chat/Command/Executor.php index f8162301e91..7f880a83944 100644 --- a/lib/Chat/Command/Executor.php +++ b/lib/Chat/Command/Executor.php @@ -84,9 +84,9 @@ public function exec(Room $room, IComment $message, Command $command, string $ar return; } - if ($command->getApp() === '' && $command->getCommand() === 'help') { + if (($command->getApp() === '' || $command->getApp() === null) && $command->getCommand() === 'help') { $output = $this->execHelp($room, $message, $arguments, $participant); - } elseif ($command->getApp() !== '') { + } elseif ($command->getApp() !== '' && $command->getApp() !== null) { $output = $this->execApp($room, $message, $command, $arguments); } else { $output = $this->execShell($room, $message, $command, $arguments); @@ -111,7 +111,7 @@ protected function execHelp(Room $room, IComment $message, string $arguments, Pa $commands = $this->commandService->findAll(); foreach ($commands as $command) { - if ($command->getApp() !== '') { + if ($command->getApp() !== '' && $command->getApp() !== null) { $response = $this->execHelpSingleCommand($room, $message, $command->getApp() . ' ' . $command->getCommand()); } else { if ($command->getCommand() === 'help' || str_contains($command->getScript(), 'alias:') || diff --git a/lib/Service/CommandService.php b/lib/Service/CommandService.php index f4ea7e071cf..86014c59edd 100644 --- a/lib/Service/CommandService.php +++ b/lib/Service/CommandService.php @@ -125,7 +125,7 @@ protected function validateCommand(Command $command): void { throw new \InvalidArgumentException('name', 2); } - if ($command->getApp() === '') { + if ($command->getApp() === '' || $command->getApp() === null) { $script = $command->getScript(); if (strpos($script, 'alias:') === 0) { try { @@ -197,7 +197,7 @@ public function resolveAlias(Command $command): Command { public function delete(int $id): Command { $command = $this->mapper->findById($id); - if ($command->getApp() !== '' || $command->getCommand() === 'help') { + if (($command->getApp() !== '' && $command->getApp() !== null) || $command->getCommand() === 'help') { throw new \InvalidArgumentException('app', 0); }