-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow DDEV version to be customised (#85)
This also disables the composer cache until ddev/ddev#3697 is released as this command is breaking setups which are using existing environment variables Additionally adds a test for the Install DDEV GitHub Action
- Loading branch information
Showing
5 changed files
with
170 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Test GitHub Actions" | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Test-GitHub-Actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Prepare Drupal | ||
run: | | ||
mv ${GITHUB_WORKSPACE}/tests/fixtures/drainpipe-test-github-actions/composer.json . | ||
mv ${GITHUB_WORKSPACE}/tests/fixtures/drainpipe-test-github-actions/Taskfile.yml . | ||
mv ${GITHUB_WORKSPACE}/tests/fixtures/drainpipe-test-github-actions/.ddev . | ||
- uses: ./scaffold/github/actions/common/set-env | ||
|
||
- name: Install and Start DDEV | ||
uses: ./scaffold/github/actions/common/ddev | ||
|
||
- name: Build Project | ||
run: | | ||
ddev composer install |
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
19 changes: 19 additions & 0 deletions
19
tests/fixtures/drainpipe-test-github-actions/.ddev/config.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: drupal | ||
type: drupal9 | ||
docroot: web | ||
php_version: "8.0" | ||
webserver_type: nginx-fpm | ||
router_http_port: "80" | ||
router_https_port: "443" | ||
xdebug_enabled: false | ||
additional_hostnames: [] | ||
additional_fqdns: [] | ||
database: | ||
type: mariadb | ||
version: "10.3" | ||
nfs_mount_enabled: false | ||
mutagen_enabled: false | ||
use_dns_when_possible: true | ||
composer_version: "2" | ||
web_environment: [] | ||
nodejs_version: "16" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3' | ||
|
||
dotenv: ['.env'] | ||
|
||
includes: | ||
drupal: ./vendor/lullabot/drainpipe/tasks/drupal.yml | ||
snapshot: ./vendor/lullabot/drainpipe/tasks/snapshot.yml | ||
|
||
tasks: | ||
build: | ||
desc: "Production composer install of the project" | ||
deps: [drupal:composer:production] | ||
cmds: | ||
- if [ ! -f "web/index.php" ]; then exit 1; fi | ||
- if [ -f "vendor/lullabot/drainpipe-dev/composer.json" ]; then exit 1; fi |
93 changes: 93 additions & 0 deletions
93
tests/fixtures/drainpipe-test-github-actions/composer.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"name": "drupal/recommended-project", | ||
"description": "Project template for Drupal 9 projects with a relocated document root", | ||
"type": "project", | ||
"license": "GPL-2.0-or-later", | ||
"homepage": "https://www.drupal.org/project/drupal", | ||
"support": { | ||
"docs": "https://www.drupal.org/docs/user_guide/en/index.html", | ||
"chat": "https://www.drupal.org/node/314178" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "https://packages.drupal.org/8" | ||
} | ||
], | ||
"require": { | ||
"composer/installers": "^1.9", | ||
"drupal/core-composer-scaffold": "^9.3", | ||
"drupal/core-project-message": "^9.3", | ||
"drupal/core-recommended": "^9.3" | ||
}, | ||
"conflict": { | ||
"drupal/drupal": "*" | ||
}, | ||
"minimum-stability": "stable", | ||
"prefer-stable": true, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"composer/installers": true, | ||
"drupal/core-composer-scaffold": true, | ||
"drupal/core-project-message": true | ||
} | ||
}, | ||
"extra": { | ||
"drupal-scaffold": { | ||
"locations": { | ||
"web-root": "web/" | ||
} | ||
}, | ||
"installer-paths": { | ||
"web/core": [ | ||
"type:drupal-core" | ||
], | ||
"web/libraries/{$name}": [ | ||
"type:drupal-library" | ||
], | ||
"web/modules/contrib/{$name}": [ | ||
"type:drupal-module" | ||
], | ||
"web/profiles/contrib/{$name}": [ | ||
"type:drupal-profile" | ||
], | ||
"web/themes/contrib/{$name}": [ | ||
"type:drupal-theme" | ||
], | ||
"drush/Commands/contrib/{$name}": [ | ||
"type:drupal-drush" | ||
], | ||
"web/modules/custom/{$name}": [ | ||
"type:drupal-custom-module" | ||
], | ||
"web/profiles/custom/{$name}": [ | ||
"type:drupal-custom-profile" | ||
], | ||
"web/themes/custom/{$name}": [ | ||
"type:drupal-custom-theme" | ||
] | ||
}, | ||
"drupal-core-project-message": { | ||
"include-keys": [ | ||
"homepage", | ||
"support" | ||
], | ||
"post-create-project-cmd-message": [ | ||
"<bg=blue;fg=white> </>", | ||
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>", | ||
"<bg=blue;fg=white> from the drupal/recommended-project template! </>", | ||
"<bg=blue;fg=white> </>", | ||
"", | ||
"<bg=yellow;fg=black>Next steps</>:", | ||
" * Install the site: https://www.drupal.org/docs/8/install", | ||
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html", | ||
" * Get support: https://www.drupal.org/support", | ||
" * Get involved with the Drupal community:", | ||
" https://www.drupal.org/getting-involved", | ||
" * Remove the plugin that prints this message:", | ||
" composer remove drupal/core-project-message" | ||
] | ||
} | ||
} | ||
} |