From f804a0ea50316f55285ef4b385068015d677da93 Mon Sep 17 00:00:00 2001 From: Kevin Wenger Date: Tue, 20 Aug 2024 08:31:59 +0200 Subject: [PATCH] fix obsolete docker-compose command in CIs --- .github/workflows/ci.yml | 38 ++++++++++++++++++------------------ .github/workflows/styles.yml | 6 +++--- CHANGELOG.md | 3 +++ scripts/hooks/post-commit | 8 ++++---- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54a6d1b..d8ed021 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,12 +18,12 @@ jobs: steps: - uses: actions/checkout@v4 - - run: docker-compose -f docker-compose.yml pull --include-deps drupal + - run: docker compose -f docker-compose.yml pull --include-deps drupal - name: Build the docker-compose stack - run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal + run: docker compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal continue-on-error: ${{ matrix.experimental }} - name: Run unit tests - run: docker-compose -f docker-compose.yml run -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }} --exclude-group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml + run: docker compose -f docker-compose.yml run -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }} --exclude-group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml continue-on-error: ${{ matrix.experimental }} @@ -48,21 +48,21 @@ jobs: steps: - uses: actions/checkout@v4 - - run: docker-compose -f docker-compose.yml pull --include-deps drupal + - run: docker compose -f docker-compose.yml pull --include-deps drupal - name: Build the docker-compose stack - run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal + run: docker compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal continue-on-error: ${{ matrix.experimental }} - name: Up a persistant Docker Container - run: docker-compose -f docker-compose.yml up -d drupal + run: docker compose -f docker-compose.yml up -d drupal - name: wait on Docker to be ready, especially Apache that takes many seconds to be up - run: docker-compose exec -T drupal wait-for-it drupal:80 -t 60 + run: docker compose exec -T drupal wait-for-it drupal:80 -t 60 - name: wait on Docker to be ready, especially MariaDB that takes many seconds to be up - run: docker-compose exec -T drupal wait-for-it db:3306 -t 60 + run: docker compose exec -T drupal wait-for-it db:3306 -t 60 - name: Bootstrap Drupal - run: docker-compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y + run: docker compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y continue-on-error: ${{ matrix.experimental }} - name: Run tests - run: docker-compose -f docker-compose.yml exec -T -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml + run: docker compose -f docker-compose.yml exec -T -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml continue-on-error: ${{ matrix.experimental }} upgrade-status: @@ -78,20 +78,20 @@ jobs: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - run: docker-compose -f docker-compose.yml pull --include-deps drupal + - run: docker compose -f docker-compose.yml pull --include-deps drupal - name: Build the docker-compose stack - run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal + run: docker compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal - name: Up a persistent Docker Container - run: docker-compose -f docker-compose.yml up -d drupal + run: docker compose -f docker-compose.yml up -d drupal - name: Add upgrade status dependency - run: docker-compose exec -T drupal wait-for-it db:3306 -- composer require --dev drupal/upgrade_status --no-interaction + run: docker compose exec -T drupal wait-for-it db:3306 -- composer require --dev drupal/upgrade_status --no-interaction - name: Bootstrap Drupal - run: docker-compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y + run: docker compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y - name: Enable upgrade status - run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en upgrade_status -y + run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en upgrade_status -y - name: Disable incompatible module - run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush pmu page_cache -y + run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush pmu page_cache -y - name: Enable the module - run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en ${{ matrix.module }} -y + run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en ${{ matrix.module }} -y - name: Run upgrade status - run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush upgrade_status:analyze ${{ matrix.module }} + run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush upgrade_status:analyze ${{ matrix.module }} diff --git a/.github/workflows/styles.yml b/.github/workflows/styles.yml index 3531ab0..1461424 100644 --- a/.github/workflows/styles.yml +++ b/.github/workflows/styles.yml @@ -49,8 +49,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: docker-compose -f docker-compose.yml pull --include-deps drupal + - run: docker compose -f docker-compose.yml pull --include-deps drupal - name: Build the docker-compose stack - run: docker-compose -f docker-compose.yml build drupal + run: docker compose -f docker-compose.yml build drupal - name: Run phpdd - run: docker-compose run drupal phpdd ./web/modules/contrib/timesup/ --file-extensions php,module,inc,install,test,profile,theme,info --exclude vendor + run: docker compose run drupal phpdd ./web/modules/contrib/timesup/ --file-extensions php,module,inc,install,test,profile,theme,info --exclude vendor diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c1693..ffcfeef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - upgrade Docker Database mariadb 10.3.8 -> 10.6 +### Fixed +- fix obsolete docker-compose command in CIs + ## [2.0.2] - 2024-06-27 ### Added - add tests with drupal 10.3 diff --git a/scripts/hooks/post-commit b/scripts/hooks/post-commit index f786f2e..97c45f4 100755 --- a/scripts/hooks/post-commit +++ b/scripts/hooks/post-commit @@ -1,11 +1,11 @@ echo "\nšŸš” \033[0;32mRunning Code Sniffer Drupal & DrupalPractice for ./web/modules/contrib/timesup/ ...\033[0m" -docker-compose exec drupal ./vendor/bin/phpcs ./web/modules/contrib/timesup/ +docker compose exec drupal ./vendor/bin/phpcs ./web/modules/contrib/timesup/ echo "\nšŸ’© \033[0;32mRunning PHP Mess Detector ...\033[0m" -docker-compose exec drupal phpmd ./web/modules/contrib/timesup/ text ./phpmd.xml --suffixes php,module,inc,install,test,profile,theme,css,info,txt --exclude *Test.php,*vendor/* +docker compose exec drupal phpmd ./web/modules/contrib/timesup/ text ./phpmd.xml --suffixes php,module,inc,install,test,profile,theme,css,info,txt --exclude *Test.php,*vendor/* echo "\nšŸ›‚ \033[0;32mRunning PHP Copy/Paste Detector ...\033[0m" -docker-compose exec drupal phpcpd ./web/modules/contrib/timesup/src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/ +docker compose exec drupal phpcpd ./web/modules/contrib/timesup/src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/ echo "\nšŸ« \033[0;32mRunning PhpDeprecationDetector ...\033[0m" -docker-compose exec drupal phpdd ./web/modules/contrib/timesup/ --file-extensions php,module,inc,install,test,profile,theme,info --exclude vendor +docker compose exec drupal phpdd ./web/modules/contrib/timesup/ --file-extensions php,module,inc,install,test,profile,theme,info --exclude vendor