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

fix: Improve composer.lock behavior with ignore-cache #260

Merged
merged 7 commits into from
Mar 5, 2025

Conversation

flagbrad
Copy link
Contributor

@flagbrad flagbrad commented Sep 7, 2024

Description

Fixes a bug where composer.lock is not honored if ignore-cache is set to true. Also, the recently added require-lock-file option had not been incorporated into tests and documentation, so added a test and docs (and fixed small typo in CONTRIBUTING)

Motivation and context

Fixes #259. Discovered by our team when we decided to ignore cache and then noticed deployment's composer packages did not match our local dev packages.

How has this been tested?

Unfortunately, I know of no way to test action.yml without actually merging it and then trying it as a GitHub action.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

@flagbrad flagbrad requested a review from ramsey as a code owner September 7, 2024 16:04
@flagbrad flagbrad changed the title fix: Improve composer.lock behavior with --ignore-cache (#259) fix: Improve composer.lock behavior with ignore-cache (#259) Sep 7, 2024
@flagbrad flagbrad changed the title fix: Improve composer.lock behavior with ignore-cache (#259) fix: Improve composer.lock behavior with ignore-cache Sep 7, 2024
Also caused a test to fail because it wasn't expecting this output. I'm not sure how this test ever passed before, but this seems to be the correct thing to do.
@flagbrad
Copy link
Contributor Author

flagbrad commented Sep 8, 2024

@ramsey I think I fixed the problem that caused this test run to fail. I was seeing this locally, but assumed it was a problem with my version of expect or something. All tests are passing locally now.

@pyrou
Copy link

pyrou commented Feb 17, 2025

@ramsey Can we have this merged?

The original issue #259 is forcing us to use cache which, in case you are on self-hosted runner, results in much slower deployments

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.09%. Comparing base (314f6c2) to head (50df088).
Report is 1 commits behind head on v3.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##               v3     #260      +/-   ##
==========================================
+ Coverage   89.91%   96.09%   +6.17%     
==========================================
  Files           5        6       +1     
  Lines         119      128       +9     
==========================================
+ Hits          107      123      +16     
+ Misses         12        5       -7     
Files with missing lines Coverage Δ
bin/composer_paths.sh 97.43% <100.00%> (ø)

... and 3 files with indirect coverage changes

@ramsey ramsey merged commit 6a168db into ramsey:v3 Mar 5, 2025
32 checks passed
@ramsey
Copy link
Owner

ramsey commented Mar 5, 2025

@flagbrad Thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When ignore-cache is true, composer update runs instead of composer install
3 participants