From ba6e3ac2e4dfca9fa24838aa23ddc10b25cb8425 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 9 Nov 2023 12:05:49 +0100 Subject: [PATCH] ci(targets): remove all non-master tests Signed-off-by: Arthur Schiwon --- .github/workflows/test-cli.yml | 39 -------------- .github/workflows/test-stable.yml | 58 --------------------- Makefile | 12 ----- tests/features/cli.feature | 84 ------------------------------- tests/features/stable24.feature | 22 -------- tests/features/stable25.feature | 54 -------------------- tests/features/stable26.feature | 20 -------- 7 files changed, 289 deletions(-) delete mode 100644 .github/workflows/test-cli.yml delete mode 100644 .github/workflows/test-stable.yml delete mode 100644 tests/features/cli.feature delete mode 100644 tests/features/stable24.feature delete mode 100644 tests/features/stable25.feature delete mode 100644 tests/features/stable26.feature diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml deleted file mode 100644 index 61537451..00000000 --- a/.github/workflows/test-cli.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Test cli - -on: - pull_request: - push: - branches: - - main - - master - - stable* - -permissions: - contents: read - -jobs: - test-cli: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ["8.1"] - - name: test-cli - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - ini-file: development - - - name: Install dependencies - run: composer i - - - name: test-cli - run: make test-cli diff --git a/.github/workflows/test-stable.yml b/.github/workflows/test-stable.yml deleted file mode 100644 index ce32e9ec..00000000 --- a/.github/workflows/test-stable.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Test stable - -on: - pull_request: - push: - branches: - - main - - master - - stable* - -permissions: - contents: read - -jobs: - test-stable: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ["8.0", "8.1", "8.2"] - nextcloud-versions: ["24", "25", "26"] - exclude: - - php-versions: "8.2" - nextcloud-versions: "25" - - php-versions: "8.2" - nextcloud-versions: "24" - - - name: test-stable - - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip - coverage: none - ini-file: development - - - name: Install dependencies - run: composer i - - - name: test-stable${{ matrix.nextcloud-versions }} - run: make test-stable${{ matrix.nextcloud-versions }} - - summary: - runs-on: ubuntu-latest - needs: test-stable - - if: always() - - name: test-stable-summary - - steps: - - name: Summary status - run: if ${{ needs.test-stable.result != 'success' }}; then exit 1; fi diff --git a/Makefile b/Makefile index 7a7b2073..c63d8d21 100644 --- a/Makefile +++ b/Makefile @@ -22,18 +22,6 @@ test/vendor: test: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat -test-cli: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/cli.feature - -test-stable24: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/stable24.feature - -test-stable25: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/stable25.feature - -test-stable26: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/stable26.feature - test-master: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat features/master.feature diff --git a/tests/features/cli.feature b/tests/features/cli.feature deleted file mode 100644 index 4ef6754f..00000000 --- a/tests/features/cli.feature +++ /dev/null @@ -1,84 +0,0 @@ -Feature: CLI updater - - Scenario: No update is available - 25.0.0 - Given the current version is 25.0.0 - When the CLI updater is run - Then the output should contain "Could not find config.php. Is this file in the "updater" subfolder of Nextcloud?" - - Scenario: No update is available - 25.0.0 - Given the current installed version is 25.0.0 - And there is no update available - When the CLI updater is run successfully - Then the installed version should be 25.0.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 25.0.0 to 25.0.1 - Given the current installed version is 25.0.0 - And there is an update to version 25.0.1 available - When the CLI updater is run successfully - Then the installed version should be 25.0.1 - And maintenance mode should be off - And upgrade is not required - - Scenario: Invalid update is available - 25.0.0 to 25.0.503 - Given the current installed version is 25.0.0 - And there is an update to version 25.0.503 available - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "Download failed - Not Found (HTTP 404)" - And the installed version should be 25.0.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update without valid signature is being offered - 24.0.0 to 24.0.3 - Given the current installed version is 24.0.0 - # This works because 24.0.3 is in the signature list with an invalid signature - And there is an update to version 24.0.3 available - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "Signature of update is not valid" - And the installed version should be 24.0.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update to older version - 25.0.0 to 24.0.2 - Given the current installed version is 25.0.0 - And there is an update to version 24.0.2 available - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "Downloaded version is lower than installed version" - And the installed version should be 25.0.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available but autoupdate is disabled - 25.0.0 to 25.0.1 - Given the current installed version is 25.0.0 - And the autoupdater is disabled - And there is an update to version 25.0.1 available - When the CLI updater is run - Then the installed version should be 25.0.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and apps2 folder is there and configured - 25.0.0 to 25.0.1 - Given the current installed version is 25.0.0 - And there is an update to version 25.0.1 available - And there is a folder called "apps2" - And there is a config for a secondary apps directory called "apps2" - When the CLI updater is run successfully - Then the installed version should be 25.0.1 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and apps2 folder is there and not configured - 25.0.0 to 25.0.1 - Given the current installed version is 25.0.0 - And there is an update to version 25.0.1 available - And there is a folder called "apps2" - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "The following extra files have been found" - And the output should contain "apps2" - And the installed version should be 25.0.0 - And maintenance mode should be off - And upgrade is not required diff --git a/tests/features/stable24.feature b/tests/features/stable24.feature deleted file mode 100644 index cb8f2b99..00000000 --- a/tests/features/stable24.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: CLI updater - stable24 base - - Scenario: Update is available - 24.0.0 to 24.0.1 - Given the current installed version is 24.0.0 - And there is an update to version 24.0.1 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 24.0.1 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 24.0.1 to 25.0.0 - Given the current installed version is 24.0.1 - And PHP is at least in version 8.0 - And the current channel is "beta" - And there is an update to version 25.0.0 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 25.0.0 - And maintenance mode should be off - And upgrade is not required - diff --git a/tests/features/stable25.feature b/tests/features/stable25.feature deleted file mode 100644 index 6e377fbc..00000000 --- a/tests/features/stable25.feature +++ /dev/null @@ -1,54 +0,0 @@ -Feature: CLI updater - stable25 base - - Scenario: Update is available - 25.0.0 beta 1 to 25.0.0 rc 1 - Given the current installed version is 25.0.0beta1 - And there is an update to prerelease version "25.0.0rc1" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 25.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available but unexpected folder found - 25.0.6 to 25.0.7 - Given the current installed version is 25.0.6 - And there is an update to version 25.0.7 available - And there is a folder called "test123" - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "The following extra files have been found" - Then the installed version should be 25.0.6 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and .well-known folder exist - 25.0.6 to 25.0.7 - Given the current installed version is 25.0.6 - And there is an update to version 25.0.7 available - And there is a folder called ".well-known" - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 25.0.7 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and .rnd file exist - 25.0.6 to 25.0.7 - Given the current installed version is 25.0.6 - And there is an update to version 25.0.7 available - And there is a folder called ".rnd" - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 25.0.7 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 25.0.0 to beta - Given the current installed version is 25.0.0rc1 - And PHP is at least in version 8.0 - And the current channel is "beta" - And there is an update to version 26.0.0 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 26.0 - And maintenance mode should be off - And upgrade is not required - diff --git a/tests/features/stable26.feature b/tests/features/stable26.feature deleted file mode 100644 index d35a5b89..00000000 --- a/tests/features/stable26.feature +++ /dev/null @@ -1,20 +0,0 @@ -Feature: CLI updater - stable26 base - - Scenario: Update is available - 26.0.0 beta 3 to 26.0.0 beta 4 - Given the current installed version is 26.0.0beta3 - And there is an update to prerelease version "26.0.0beta4" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 26.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 26.0.0 RC 1 to 26.0.0 - Given the current installed version is 26.0.0rc1 - And there is an update to version 26.0.0 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 26.0 - And maintenance mode should be off - And upgrade is not required