Skip to content

Commit

Permalink
fix obsolete docker-compose command in CIs
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Aug 20, 2024
1 parent 5e119ab commit c2a042c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}


Expand All @@ -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:
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions .github/workflows/styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions scripts/hooks/post-commit
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c2a042c

Please sign in to comment.