Repository navigation
ci(4.x): run tests, changelog and Rector against 4.x - #44
Merged
Merged
Conversation
- run-tests only triggered on v3, so 4.x had no test CI at all. - update-changelog checked out main (absent) and pushed to v3; use the release's target branch instead. - add declare(strict_types=1) to the five files Rector flagged.
There was a problem hiding this comment.
🟡 Changes recommended
The changelog workflow may check out or push to the wrong branch because target_commitish can be unrelated to an existing tag or be a commit SHA.
1 open issue
What changed in this PR
This PR updates CI for the 4.x maintenance branch and adds strict typing declarations required by Rector.
Changes:
- Runs tests for pushes and pull requests targeting
4.x. - Uses the release’s
target_commitishfor changelog checkout and push. - Adds
declare(strict_types=1)to five PHP files.
| File | Description |
|---|---|
tests/src/Models/SpatiePost.php |
Enables strict typing in the Spatie test model. |
tests/src/Models/AstrotomicPostTranslation.php |
Enables strict typing in the translation test model. |
tests/src/Models/AstrotomicPost.php |
Enables strict typing in the Astrotomic test model. |
tests/Pest.php |
Enables strict typing in Pest setup. |
src/Forms/Component/Translations/Tab.php |
Enables strict typing in the translation tab component. |
.github/workflows/update-changelog.yml |
Uses the release target for checkout and changelog commits. |
.github/workflows/run-tests.yml |
Changes test triggers from v3 to 4.x. |
Review effort: Balanced
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: main | ||
| ref: ${{ github.event.release.target_commitish }} |
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.

run-tests.ymlonly triggered onv3, so 4.x had no test CI. Now triggers on4.x.update-changelog.ymlchecked outmain(doesn't exist) and pushed tov3, so the v4.0.2 release run failed. Now uses the release'starget_commitish.declare(strict_types=1)to the five files it flagged.Locally on Laravel 12.70: 50 tests pass, PHPStan, Pint and Rector clean.
Note: CHANGELOG.md on 4.x stops at 2.0.0; v4.0.0–v4.0.2 entries are not backfilled here.