Continuous integration #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration | |
on: | |
push: | |
schedule: | |
- cron: '0 0 * * THU' | |
jobs: | |
tests-functional: | |
name: Functional Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
drupal_version: ['9.5', '10.0', '10.1', '10.2'] | |
module: [ 'vercel_deploy' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
- name: Up a persistent Docker Container | |
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 | |
- 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 | |
- 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 | |
- 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 | |
upgrade-status: | |
name: Upgrade Status | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
drupal_version: ['9.5'] | |
module: ['vercel_deploy'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- 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 | |
- name: Up a persistent Docker Container | |
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 | |
- 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 | |
- name: Enable upgrade status | |
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 | |
- name: Enable the module | |
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 }} |