diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 2a26641..a20de15 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -42,19 +42,6 @@ jobs: version: '8.1' tags: 8.1 platform: linux/amd64,linux/arm64 - php80: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: docker/setup-qemu-action@v1 - with: - platforms: amd64,arm64 - - uses: docker/setup-buildx-action@v1 - - uses: ./.github/actions - with: - version: '8.0' - tags: '8.0' - platform: linux/amd64,linux/arm64 ### dev php82-dev: runs-on: ubuntu-latest @@ -84,20 +71,6 @@ jobs: dev: 1 tags: 8.1-dev platform: linux/amd64,linux/arm64 - php80-dev: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: docker/setup-qemu-action@v1 - with: - platforms: amd64,arm64 - - uses: docker/setup-buildx-action@v1 - - uses: ./.github/actions - with: - version: '8.0' - dev: 1 - tags: 8.0-dev - platform: linux/amd64,linux/arm64 ### dev-macos php82-dev-macos: runs-on: ubuntu-latest @@ -127,17 +100,3 @@ jobs: dev_macos: 1 tags: 8.1-dev-macos platform: linux/amd64,linux/arm64 - php80-dev-macos: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: docker/setup-qemu-action@v1 - with: - platforms: amd64,arm64 - - uses: docker/setup-buildx-action@v1 - - uses: ./.github/actions - with: - version: '8.0' - dev_macos: 1 - tags: 8.0-dev-macos - platform: linux/amd64,linux/arm64 diff --git a/.php b/.php index 8026206..0f2d790 100644 --- a/.php +++ b/.php @@ -1,3 +1,2 @@ 8.2#2023-11-29T04:01:44.751916Z -8.1#2023-11-29T04:01:44.751916Z -8.0#2023-11-29T04:01:44.751916Z \ No newline at end of file +8.1#2023-11-29T04:01:44.751916Z \ No newline at end of file diff --git a/Makefile b/Makefile index d141a34..9f2d9ca 100644 --- a/Makefile +++ b/Makefile @@ -67,15 +67,10 @@ buildx-push: test: ifeq ($(PHP_VER),8.2) - @echo "Drupal 9 and 7 don't support PHP 8.2" + @echo "Drupal 7 doesn't support PHP 8.2" cd ./tests/10 && IMAGE=$(REPO):$(TAG) ./run.sh -else ifeq ($(PHP_VER),8.0) - @echo "Drupal 10 doesn't support PHP 8.0" - cd ./tests/9 && IMAGE=$(REPO):$(TAG) ./run.sh - cd ./tests/7 && IMAGE=$(REPO):$(TAG) ./run.sh else cd ./tests/10 && IMAGE=$(REPO):$(TAG) ./run.sh - cd ./tests/9 && IMAGE=$(REPO):$(TAG) ./run.sh cd ./tests/7 && IMAGE=$(REPO):$(TAG) ./run.sh endif diff --git a/README.md b/README.md index a51b7fe..bce3210 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,10 @@ Supported tags and respective `Dockerxfile` links: - `8.2`, `8`, `latest` [_(Dockerfile)_] - `8.1` [_(Dockerfile)_] -- `8.0` [_(Dockerfile)_] - `8.2-dev`, `8-dev`, `dev` [_(Dockerfile)_] - `8.1-dev` [_(Dockerfile)_] -- `8.0-dev` [_(Dockerfile)_] - `8.2-dev-macos`, `8-dev-macos`, `dev-macos` [_(Dockerfile)_] - `8.1-dev-macos` [_(Dockerfile)_] -- `8.0-dev-macos` [_(Dockerfile)_] See [wodby/php](https://github.com/wodby/php) for the exact PHP version @@ -33,12 +30,12 @@ All images built for `linux/amd64` and `linux/arm64` ## Tools -| Tool | 8.2 | 8.1 | 8.0 | -|---------------------------|--------|--------|--------| -| [Drupal Console Launcher] | 1.9.7 | 1.9.7 | 1.9.7 | -| [Drush] | 8 | 8 | 8 | -| [Drush Launcher] | 0.10.2 | 0.10.2 | 0.10.2 | -| [Drush Registry Rebuild] | 7.x | 7.x | 7.x | +| Tool | 8.2 | 8.1 | +|---------------------------|--------|--------| +| [Drupal Console Launcher] | 1.9.7 | 1.9.7 | +| [Drush] | 8 | 8 | +| [Drush Launcher] | 0.10.2 | 0.10.2 | +| [Drush Registry Rebuild] | 7.x | 7.x | ## Environment Variables diff --git a/tests/9/docker-compose.yml b/tests/9/docker-compose.yml deleted file mode 100644 index 8725c3e..0000000 --- a/tests/9/docker-compose.yml +++ /dev/null @@ -1,60 +0,0 @@ -version: "2" - -services: - nginx: - image: wodby/nginx - environment: - NGINX_BACKEND_HOST: php - NGINX_VHOST_PRESET: drupal9 - NGINX_SERVER_ROOT: /var/www/html/web - NGINX_SERVER_NAME: drupal9.test - volumes: - - codebase:/var/www/html - - files:/mnt/files - depends_on: - - php - - mariadb: - image: wodby/mariadb - environment: - MYSQL_ROOT_PASSWORD: password - MYSQL_USER: drupal - MYSQL_PASSWORD: drupal - MYSQL_DATABASE: drupal - - redis: - image: wodby/redis - environment: - REDIS_PASSWORD: redis - - php: - image: $IMAGE - environment: - DEBUG: 1 - DOCROOT_SUBDIR: web - DRUPAL_VERSION: 9 - DRUPAL_SITE: default - DRUPAL_HASH_SALT: drupal-bad-hash-salt - DRUPAL_FILES_SYNC_SALT: drupal-files-sync-bad-salt - WODBY_HOSTS: |- - ["drupal9.test", "drupal9.wodby.wod.by", "test.drupal9.wodby.wod.by"] - WODBY_HOST_PRIMARY: drupal9.test - WODBY_URL_PRIMARY: http://drupal9.test - DB_HOST: mariadb - DB_USER: drupal - DB_PASSWORD: drupal - DB_NAME: drupal - DB_DRIVER: mysql - REDIS_HOST: redis - REDIS_PORT: 6379 - REDIS_PASSWORD: redis - PHP_SENDMAIL_PATH: /bin/true - PHP_ERROR_REPORTING: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED - volumes: - - codebase:/var/www/html - - files:/mnt/files - - ./tests.sh:/usr/local/bin/tests.sh - -volumes: - codebase: - files: \ No newline at end of file diff --git a/tests/9/run.sh b/tests/9/run.sh deleted file mode 100755 index ac12ca1..0000000 --- a/tests/9/run.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [[ -n "${DEBUG}" ]]; then - set -x -fi - -check_ready() { - docker-compose exec -T "${1}" make check-ready "${@:2}" -f /usr/local/bin/actions.mk -} - -docker-compose up -d - -check_ready nginx max_try=10 -check_ready php max_try=10 -check_ready mariadb max_try=12 wait_seconds=5 - -# Fix php volumes permissions again -# Docker sets ephemeral shared volume ownership to default user (wodby) in nginx container (started after php) -# In case of -dev-macos version of php images wodby owner uid/gid in php and nginx containers do not match -if [[ "${IMAGE}" =~ "-dev-macos" ]]; then - docker-compose exec -T php sudo init_container -fi - -docker-compose exec -T --user=0 php apk add --update jq grep -docker-compose exec -T php tests.sh -docker-compose down -v diff --git a/tests/9/tests.sh b/tests/9/tests.sh deleted file mode 100755 index 942de1a..0000000 --- a/tests/9/tests.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash - -# TODO: test sites.php entries - -set -e - -if [[ -n "${DEBUG}" ]]; then - set -x -fi - -check_rq() { - echo "Checking requirement: ${1} must be ${2}" - drush rq --format=json | jq '.[] | select(.title=="'"${1}"'") | .value' | grep -q "${2}" - echo "OK" -} - -check_status() { - echo "Checking status: ${1} must be ${2}" - drush status --format=yaml | grep -q "${1}: ${2}" - echo "OK" -} - -run_action() { - make "${@}" -f /usr/local/bin/actions.mk -} - -echo -n "Checking drush... " -drush version --format=yaml -echo "OK" - -echo -n "Checking environment variables... " -env | grep -q ^DOCROOT_SUBDIR= -env | grep -q ^DRUPAL_VERSION= -env | grep -q ^DRUPAL_SITE= -echo "OK" - -if [[ -n "${DOCROOT_SUBDIR}" ]]; then - DRUPAL_ROOT="${APP_ROOT}/${DOCROOT_SUBDIR}" -else - DRUPAL_ROOT="${APP_ROOT}" -fi - -FILES_ARCHIVE_URL="https://s3.amazonaws.com/wodby-sample-files/drupal-php-import-test/files.tar.gz" -GIT_URL="https://github.com/drupal/recommended-project" - -make git-clone url="${GIT_URL}" -f /usr/local/bin/actions.mk -# Get latest stable drupal 9 tag. -latest_ver=$(git show-ref --tags | grep -P -o '(?<=refs/tags/)9\.[0-9]+\.[0-9]+$' | sort -rV | head -n1) -make git-checkout target="${latest_ver}" -f /usr/local/bin/actions.mk - -COMPOSER_MEMORY_LIMIT=-1 composer install -n -composer require drush/drush -composer require drupal/redis - -cd "${DRUPAL_ROOT}" - -run_action files-import source="${FILES_ARCHIVE_URL}" -run_action init-drupal - -drush si -y --db-url="${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}" - -# Comment out redis settings before enabling the module. -sed -i "s#^\$wodby\['redis'\]#//&#" "${CONF_DIR}/wodby.settings.php" -drush en redis -y --quiet -sed -i "s#^//\(\$wodby\['redis'\]\)#\1#" "${CONF_DIR}/wodby.settings.php" - -run_action cache-clear target=render -run_action cache-rebuild - -check_status "root" "${DRUPAL_ROOT}" -check_status "site" "sites/${DRUPAL_SITE}" -check_status "files" "sites/${DRUPAL_SITE}/files" -check_status "private" "${FILES_DIR}/private" -check_status "temp" "/tmp" - -check_rq "Redis" "Connected" -check_rq "Trusted Host Settings" "Enabled" -check_rq "File system" "Writable" -check_rq "Configuration files" "Protected" - -echo -n "Checking imported files... " -curl -s -I -H "host: ${WODBY_HOST_PRIMARY}" "nginx/sites/default/files/logo.png" | grep -q "200 OK" -echo "OK" - -echo -n "Checking Drupal homepage... " -curl -s -H "host: ${WODBY_HOST_PRIMARY}" "nginx" | grep -q "Drupal ${DRUPAL_VERSION} (https://www.drupal.org)" -echo "OK"