Contribution Date
Contribution Project
Contribution Details
Refactor: consolidate workflow, fix SQLite installation
This commit consolidates the Docker build and test workflow into a single file (`docker-buildx.yml`), removing the redundant `test-drupal.yml`. It also improves the Drupal installation script to be more robust, explicitly accept version constraints, and fixes the SQLite database URL.
Key changes:
- `docker-buildx.yml`:
- Merged test steps from `test-drupal.yml`.
- Passes explicit Drupal version constraints (`^10` for PHP 8.2, `^11` for others) to the install script.
- Cleans `drupal-root` before starting containers.
- `tests/install-drupal.sh`:
- Removed `HAS_COMPOSER` check; the script now assumes a clean state and unconditionally creates the project.
- Accepts the version constraint directly as the second argument (e.g., `^10`), removing internal parsing logic.
- Uses `rm -rf` to ensure the directory is clean before `composer create-project`.
- Fixed `drush site:install` command to use `sqlite://sites/default/files/.ht.sqlite` (removed `localhost`) to prevent permission issues.
- `php8/apache-bookworm/Dockerfile`:
- Added `SQLITE_ENABLE_COLUMN_METADATA=1` to `CPPFLAGS` to fix Drupal compatibility with the custom SQLite build.
This ensures a reliable "Build -> Test -> Push" pipeline where the push only happens if tests pass.
Co-authored-by: hussainweb <1040271+hussainweb@users.noreply.github.com>
Contribution Issue Link
Files count
0
Patches count
1