Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test recipes #92

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .ddev/commands/host/recipe-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this in feature/recipes to be scratch-from-recipes-wip.


## Description: Installs CE recipe and opens it in a browser.

ddev delete -O -y
chmod -R 777 web/sites/default
rm web/sites/default/settings.php
rm -rf web/sites/default/files
rm -rf vendor
ddev start
ddev composer install
cd web && php -d memory_limit=512M core/scripts/drupal install recipes/contrib/frees-auce-recipes/ce
ddev drush uli
34 changes: 34 additions & 0 deletions .github/workflows/recipe-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Recipe Test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for now, but FYI once everything is working we will replace the test that uses drush si minimal --existing-config -y

on:
push
jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Composer install
uses: kohlerdominik/docker-run-action@v1
with:
image: composer
shell: /bin/bash
workdir: /app
volumes:
${{ github.workspace }}:/app
run: |
composer install --ignore-platform-reqs

- name: Recipe install
uses: kohlerdominik/docker-run-action@v1
with:
image: bitnami/php-fpm:8.2
shell: /bin/bash
workdir: /app
volumes:
${{ github.workspace }}:/app
run: |
cd web && php -d memory_limit=512M core/scripts/drupal install recipes/contrib/frees-auce-recipes/ce
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to drush method.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ drush-backups
.phpunit.result.cache
*.sql
*.zip

# Recipes
web/recipes/contrib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already added web/recipes in feature/recipes.

8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
}
],
"require": {
"frees-au/ce-recipes": "dev-main",
"composer/installers": "^2.0",
"drupal/admin_toolbar": "^3.4",
"drupal/ckeditor5_template": "^1.0",
Expand All @@ -39,7 +38,8 @@
"drupal/simple_sitemap": "^4.1",
"drupal/twig_remove_html_comments": "^1.0@beta",
"drupal/webform": "^6.2",
"drush/drush": "^12",
"drush/drush": "^13",
"frees-au/ce-recipes": "dev-main",
"oomphinc/composer-installers-extender": "^2",
"platformsh/config-reader": "^2.4"
},
Expand Down Expand Up @@ -97,8 +97,6 @@
"[web-root]/sites/development.services.yml": false,
"[web-root]/sites/example.settings.local.php": false,
"[web-root]/sites/example.sites.php": false,
"[web-root]/sites/default/default.services.yml": false,
"[web-root]/sites/default/default.settings.php": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add these back. Not needed with drush.

"[web-root]/modules/README.txt": false,
"[web-root]/profiles/README.txt": false,
"[web-root]/themes/README.txt": false
Expand All @@ -113,7 +111,7 @@
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/profiles/custom/{$name}": ["type:drupal-custom-profile"],
"web/recipes/{$vendor}{$name}": ["type:drupal-recipe"],
"web/recipes/contrib/{$vendor}{$name}": ["type:drupal-recipe"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that i changed this to just be {$vendor}

"web/themes/contrib/{$name}": ["type:drupal-theme"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
},
Expand Down
Loading
Loading