Include binaries during ddev start #172 #1407
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: Test Production Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
Test-Production-Build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
php-version: [7.3, 7.4, 8.0] | |
include: | |
- php-version: 7.3 | |
composer-flags: --prefer-lowest --prefer-stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer:v2 | |
extensions: gd | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Drupal | |
run: | | |
cd ../ | |
mkdir drupal | |
cd drupal | |
cp ${GITHUB_WORKSPACE}/tests/fixtures/drainpipe-test-production-build/composer.json . | |
cp ${GITHUB_WORKSPACE}/tests/fixtures/drainpipe-test-production-build/Taskfile.yml . | |
composer update ${{ matrix.composer-flags }} | |
- name: Run production build | |
run: | | |
cd ../drupal | |
./vendor/bin/task build | |
Test-Production-Build-DDEV-Global-Binary: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: drainpipe | |
- uses: ./drainpipe/scaffold/github/actions/common/set-env | |
- name: Install DDEV | |
uses: ./drainpipe/scaffold/github/actions/common/ddev | |
with: | |
git-name: Drainpipe Bot | |
git-email: no-reply@example.com | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Setup Project | |
run: | | |
cp drainpipe/tests/fixtures/drainpipe-test-production-build/composer-ddev-global-binary.json composer.json | |
cp drainpipe/tests/fixtures/drainpipe-test-production-build/Taskfile.yml . | |
ddev config --project-type=drupal9 | |
ddev start | |
ddev composer install | |
# ddev won't create settings.ddev.php until settings.php exists. | |
ddev config --project-type=drupal9 | |
ddev restart | |
- name: Install Drupal | |
run: | | |
ddev drush site:install minimal -y | |
echo "\$settings['config_sync_directory'] = '../config';" >> web/sites/default/settings.php | |
ddev drush config:export -y | |
- name: Run production build | |
run: ddev task build |