From 5ca8721abbe767a34e3e6d712cc2e902046f1f42 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 17 Sep 2021 09:25:55 +0200 Subject: [PATCH] Ensure downgrade works in CI Merge multiple composer steps into one to circumvent mixed up state. Otherwise some versions might be locked, preventing downgrades. Also should save bandwidth and time by only installing dependencies once. --- .github/workflows/ci.yaml | 69 ++++++++++----------------------------- 1 file changed, 18 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 67ed1fd..29607ca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -66,14 +66,8 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-plugins - - - name: Install dependency checker - run: composer require --prefer-dist --no-progress --no-plugins --update-with-all-dependencies "maglnet/composer-require-checker" - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --no-plugins --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress --no-plugins "maglnet/composer-require-checker" "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: Missing composer requirements run: ./vendor/bin/composer-require-checker check --config-file dependency-checker.json @@ -111,14 +105,8 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-plugins - - - name: Install dependency checker - run: composer require --prefer-dist --no-progress --no-plugins --update-with-all-dependencies "maglnet/composer-require-checker" - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --no-plugins --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress --no-plugins "maglnet/composer-require-checker" "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: Missing composer requirements run: ./vendor/bin/composer-require-checker check --config-file dependency-checker.json @@ -228,11 +216,8 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: PHPUnit Tests run: ./vendor/bin/phpunit --testdox @@ -271,11 +256,8 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: PHPUnit Tests run: ./vendor/bin/phpunit --testdox @@ -324,11 +306,8 @@ jobs: mysql database: 'typo3' mysql root password: 'root' - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: PHPUnit Tests run: |- @@ -381,11 +360,8 @@ jobs: mysql database: 'typo3' mysql root password: 'root' - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: PHPUnit Tests run: |- @@ -439,11 +415,8 @@ jobs: mysql database: 'typo3' mysql root password: 'root' - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: PHPUnit Tests run: |- @@ -487,11 +460,8 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: Code Quality (by PHPStan) run: ./vendor/bin/phpstan analyse @@ -529,11 +499,8 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Switch to expected TYPO3 Version - run: composer require --prefer-dist --no-progress --update-with-all-dependencies "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" + - name: Install dependencies with expected TYPO3 version + run: composer require --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-dashboard:${{ matrix.typo3-version }}" - name: Code Quality (by PHPStan) run: ./vendor/bin/phpstan analyse