Repository navigation
ci: run Composer on the runner and fail on plugin install errors - #1092
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI setup job's Install dependencies step logged errors for every plugin, but the step still passed. The slides importer's dependencies never installed.
Cause
php-actions/composerruns Composer in its own Docker image, which ignores the PHP from the Setup PHP step. In that container:npm install || truefails silently.zipandgdare missing, socomposer installfails for cbf-slides-importer (phpoffice packages).None of this failed the step.
install-sspjoins the plugin installs with;, so its exit status comes from the finalcd. The same script runs during the server deploy'scomposer install, so a failed plugin install there would go unnoticed too.The cache step saved
/tmp/composer-cache, a path that only applied inside the Docker action.Changes
composer installdirectly on the runner, withzipandgdenabled insetup-php, and cache Composer's actualcache-files-dir.install-sspandupdate-sspchain commands with&&, so a failed plugin install fails the command (and the CI step or deploy).Production's command-line PHP has
zipandgdloaded, so the stricter chaining shouldn't break deploys there. Staging is on the same host but wasn't checked.Testing
Locally:
composer run-script install-sspexits 0, with no changes to tracked files or the lock file.composerthat fails in cbf-slides-importer, the script stops there with error code 1 and skips the remaining plugins.The workflow parses, and actionlint reports only the existing shellcheck notes on the
versionjob. This PR's own CI run is the first real test of the new step. Expect it to take longer, because the cache starts empty and cbf-multisite'snpm installnow actually runs.