Skip to content

Build pipeline fix, drop Drupal <10.1 support, flag PHP 8.2 support #81

Build pipeline fix, drop Drupal <10.1 support, flag PHP 8.2 support

Build pipeline fix, drop Drupal <10.1 support, flag PHP 8.2 support #81

Workflow file for this run

name: Swagger UI Formatter tests
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
code_style:
runs-on: ubuntu-20.04
steps:
- name: Checkout Swagger UI Formatter
uses: actions/checkout@v2
- name: Checkout Drupal-Dev
uses: actions/checkout@v2
with:
repository: Pronovix/docker-drupal-dev
path: ./drupal-dev
- name: Setup environment
run: |
mkdir build
sudo chown runneradmin build
ln -s drupal-dev/docker-compose.yml .
ln -s drupal-dev/Dockerfile .
printf "COMPOSE_PROJECT_NAME=swagger_ui_formatter\n" > .env
- name: Create Docker containers
env:
PHP_IMAGE: "wodby/drupal-php:8.1-dev"
run: |
docker compose pull --quiet
docker compose up -d --build
- name: Install dependencies
run: |
chmod a+rw .
docker compose exec -T php composer install --no-interaction --no-suggest --no-progress -d ..
- name: Run code style check
run: CHECK_CS="true" ./.dev/.ci/check-cs.sh
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php_image: ["wodby/drupal-php:8.1-dev", "wodby/drupal-php:8.2-dev"]
db_image: ["wodby/mariadb:10.5"]
# TODO Get version range from composer.json dynamically.
drupal_version: ["^10.1"]
lowest_highest: ["--prefer-lowest", ""]
steps:
- name: Checkout Swagger UI Formatter
uses: actions/checkout@v2
- name: Checkout Drupal-Dev
uses: actions/checkout@v2
with:
repository: Pronovix/docker-drupal-dev
path: ./drupal-dev
# TODO Remove this after Drupal QA got a PHP 8.2 compatible release.
- name: Drupal QA workaround
if: matrix.php_image == 'wodby/drupal-php:8.2-dev'
run: |
export COMPOSER_IGNORE_PLATFORM_REQ=php+
- name: Setup environment
run: |
mkdir build
sudo chown runneradmin build
ln -s drupal-dev/docker-compose.yml .
ln -s drupal-dev/Dockerfile .
printf "COMPOSE_PROJECT_NAME=swagger_ui_formatter\n" > .env
- name: Create Docker containers
env:
PHP_IMAGE: ${{ matrix.php_image }}
DB_IMAGE: ${{ matrix.db_image }}
run: |
docker compose pull --quiet
docker compose up -d --build
- name: Install dependencies
run: |
chmod a+rw .
docker compose exec -T php composer install --no-interaction --no-suggest --no-progress -d ..
chmod a+rw composer.json
docker compose exec -T php composer require drupal/core:${{ matrix.drupal_version }} drupal/core-dev:${{ matrix.drupal_version }} drupal/core-recommended:${{ matrix.drupal_version }} drupal/core-composer-scaffold:${{ matrix.drupal_version }} --no-update -d ..
docker compose exec --env COMPOSER_DISCARD_CHANGES=true -T php composer update --no-progress ${{ matrix.lowest_highest }} -d ..
- name: List installed dependencies
run: docker compose exec -T php composer show -d ..
- name: Set up Drupal settings files
run: |
sudo chown -R runner build/web/sites
ln -s ../../../../drupal-dev/drupal/settings.php build/web/sites/default/settings.php
ln -s ../../../../drupal-dev/drupal/settings.shared.php build/web/sites/default/settings.shared.php
ln -s ../../../../drupal-dev/drupal/settings.testing.php build/web/sites/default/settings.testing.php
ln -s ../../../drupal-dev/drupal/development.services.yml.dist build/web/sites/development.services.yml.dist
sudo chown -R runneradmin build/web/sites
- name: Run tests
run: RUN_PHPUNIT_TESTS="true" ./.dev/.ci/run-phpunit-tests.sh