Skip to content
Snippets Groups Projects
Commit 106b13bb authored by Adam G-H's avatar Adam G-H Committed by Adam G-H
Browse files

Issue #3496652 by phenaproxima, catch: Allow nightly testing against...

Issue #3496652 by phenaproxima, catch: Allow nightly testing against development versions of dependencies
parent b7a5e0c1
No related branches found
No related tags found
No related merge requests found
Pipeline #382233 passed with warnings
...@@ -15,10 +15,9 @@ corepack_enable: false ...@@ -15,10 +15,9 @@ corepack_enable: false
ddev_version_constraint: '>= 1.24.0' ddev_version_constraint: '>= 1.24.0'
hooks: hooks:
post-start: post-start:
# If needed, regenerate `composer.json` and install dependencies.
# @see homeadditions/bin/generate-composer-json # @see homeadditions/bin/generate-composer-json
- exec: 'generate-composer-json > composer.json' - exec: 'test -d vendor || (generate-composer-json > composer.json && composer install)'
# Install all dependencies.
- composer: 'install'
# The installer is part of the project template, so symlink it into the web root. # The installer is part of the project template, so symlink it into the web root.
# It needs to be a relative symlink, or it will break Package Manager. # It needs to be a relative symlink, or it will break Package Manager.
- exec: 'ln -s -f $(realpath -s --relative-to=$DDEV_DOCROOT/profiles project_template/$DDEV_DOCROOT/profiles/drupal_cms_installer) $DDEV_DOCROOT/profiles' - exec: 'ln -s -f $(realpath -s --relative-to=$DDEV_DOCROOT/profiles project_template/$DDEV_DOCROOT/profiles/drupal_cms_installer) $DDEV_DOCROOT/profiles'
...@@ -28,13 +27,16 @@ hooks: ...@@ -28,13 +27,16 @@ hooks:
# https://docs.cypress.io/guides/getting-started/installing-cypress. # https://docs.cypress.io/guides/getting-started/installing-cypress.
- exec: 'test -d node_modules || npm clean-install --foreground-scripts' - exec: 'test -d node_modules || npm clean-install --foreground-scripts'
web_environment: web_environment:
# If CANARY is set, Composer will install dev branches of all dependencies (be sure to
# run `ddev rebuild` if you change this).
# @see homeadditions/bin/generate-composer-json
# - CANARY=1
# For faster performance, don't audit dependencies automatically. # For faster performance, don't audit dependencies automatically.
- COMPOSER_NO_AUDIT=1 - COMPOSER_NO_AUDIT=1
# To display its UI, Cypress needs to be able to talk to an X11 server # To display its UI, Cypress needs to be able to talk to an X11 server running on the
# running on the host machine. # host machine.
# - DISPLAY=host.docker.internal:0 # - DISPLAY=host.docker.internal:0
# Download Cypress to a directory that won't be blown away every time the # Download Cypress where it won't be deleted every time the project is restarted.
# project is restarted.
- CYPRESS_CACHE_FOLDER=/var/www/html/.cache/cypress - CYPRESS_CACHE_FOLDER=/var/www/html/.cache/cypress
# Use the DDEV-provided database to run PHPUnit tests. # Use the DDEV-provided database to run PHPUnit tests.
- SIMPLETEST_DB=$DDEV_DATABASE_FAMILY://db:db@db/db - SIMPLETEST_DB=$DDEV_DATABASE_FAMILY://db:db@db/db
......
...@@ -24,6 +24,12 @@ if (getenv('CI')) { ...@@ -24,6 +24,12 @@ if (getenv('CI')) {
}); });
} }
// If we're in "canary" mode, allow dev versions of all dependencies.
if (getenv('CANARY')) {
$data['minimum-stability'] = 'dev';
$data['prefer-stable'] = FALSE;
}
// Make packages.drupal.org the lowest-priority repository, which will force the // Make packages.drupal.org the lowest-priority repository, which will force the
// components' local path repositories to take precedence. // components' local path repositories to take precedence.
$repository = $data['repositories']['drupal']; $repository = $data['repositories']['drupal'];
......
...@@ -111,6 +111,8 @@ build test project: ...@@ -111,6 +111,8 @@ build test project:
- .ddev/homeadditions/bin/generate-composer-json > $BUILD_DIR/composer.json - .ddev/homeadditions/bin/generate-composer-json > $BUILD_DIR/composer.json
# Install dependencies. # Install dependencies.
- composer install --working-dir=$BUILD_DIR - composer install --working-dir=$BUILD_DIR
# Remove all `.git` directories in the built project.
- find $BUILD_DIR -depth -type d -name '.git' -exec rm -r -f {} ';'
artifacts: artifacts:
paths: paths:
- $BUILD_DIR - $BUILD_DIR
......
...@@ -13,5 +13,6 @@ ...@@ -13,5 +13,6 @@
"@testing-library/cypress": "^10.0.2", "@testing-library/cypress": "^10.0.2",
"chai-string": "^1.5.0", "chai-string": "^1.5.0",
"cypress": "^13.15.0" "cypress": "^13.15.0"
} },
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment