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

Harmonize CI workflow #57

Merged
merged 20 commits into from
Oct 17, 2023
Merged

Harmonize CI workflow #57

merged 20 commits into from
Oct 17, 2023

Conversation

szepeviktor
Copy link
Contributor

@szepeviktor szepeviktor commented Aug 19, 2023

Improve every line in the workflow.

@PabloKowalczyk Please do squash my commits.

Comment on lines +4 to +6
pull_request:
branches:
- '3.5'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prevent double runs for PR-s.

Copy link
Member

Choose a reason for hiding this comment

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

Do i need to change it when i add new "main" branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Copy link
Member

Choose a reason for hiding this comment

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

What about bugfixes that will target 3.4 branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All supported branches should be listed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But this CI configuration will not run on old branches.

I've meant it will fail because of Symfony versions.

Copy link
Member

Choose a reason for hiding this comment

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

No, only on the branches listed above. What branches should I add?

Please add 3.5 and 3.6, hold on with rebase until I release v3.5.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 🍏

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment on lines +11 to +13
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cancel earlier runs.

Comment on lines +65 to +68
- uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: '--with=symfony/console:${{ matrix.symfony_version }}'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use Ben's excellent action: cache+install


name: Static analysis
steps:
- uses: actions/checkout@v3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upgrade all actions.

@@ -0,0 +1,107 @@
name: PHP
Copy link
Contributor Author

@szepeviktor szepeviktor Aug 19, 2023

Choose a reason for hiding this comment

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

New name! 🎉

May I add a spellcheck workflow? #56

Copy link
Member

Choose a reason for hiding this comment

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

OK, lets try it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. In the next PR.

composer.json Outdated
"symfony/mailer": "^5.4.9 || ^6.0.9",
"symfony/process": "^5.4.9 || ^6.0.9",
"symfony/yaml": "^5.4.9 || ^6.0.9"
"symfony/config": "^5.4.9 || ^6.0.9 || ^6.1.0 || ^6.2.0",
Copy link
Member

Choose a reason for hiding this comment

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

There is no need to add ^6.1.0 || ^6.2.0, ^6.0.9 is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@szepeviktor
Copy link
Contributor Author

Please don't care about the static analysis error in this PR.

@PabloKowalczyk
Copy link
Member

CI fails, because You changed Symfony version to 6.3 from 6.1 in "static analysis" job - that is good catch, but code is not ready for this change, so you can revert to 6.1 or fix issues, you decide.

@szepeviktor
Copy link
Contributor Author

revert to 6.1

Done.

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Oct 15, 2023

Oh no! 6.1 support ended.

"symfony/console": "^5.4.9 || ^6.3.0",

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Oct 15, 2023

I had to hire a DEVELOPER 🤯

@PabloKowalczyk PabloKowalczyk added this to the v3.5 milestone Oct 16, 2023
php:
- '8.0'
- '8.1'
- '8.2'
Copy link
Member

Choose a reason for hiding this comment

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

What about 8.3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@PabloKowalczyk PabloKowalczyk merged commit ce56198 into crunzphp:3.5 Oct 17, 2023
@PabloKowalczyk
Copy link
Member

Thanks @szepeviktor

- uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: '--with=symfony/console:${{ matrix.symfony_version }}'
Copy link
Member

Choose a reason for hiding this comment

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

It's already merged, but looks like this will install only symfony/console in expected version, not all symfony dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Composer is smart enough to match versions of other Symfony pkgs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No.

  - Locking symfony/config (v6.3.2)
  - Locking symfony/console (v5.4.28) 👈🏻 
  - Locking symfony/dependency-injection (v6.3.5)
  - Locking symfony/deprecation-contracts (v3.3.0)
  - Locking symfony/error-handler (v6.3.5)
  - Locking symfony/event-dispatcher (v6.3.2)
  - Locking symfony/event-dispatcher-contracts (v3.3.0)
  - Locking symfony/filesystem (v6.3.1)
  - Locking symfony/finder (v6.3.5)
  - Locking symfony/lock (v6.3.2)
  - Locking symfony/mailer (v6.3.5)
  - Locking symfony/mime (v6.3.5)

All others are at 6.3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I never thought a 5.4 Symfony pkg is compatible with other 6.3 ones.

Copy link
Member

Choose a reason for hiding this comment

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

Told You :) Looks like custom composer-install.php should be reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should come up with a tiny and effective solution in minutes 🕦

@szepeviktor szepeviktor deleted the ci-harmonize branch October 17, 2023 13:24
@PabloKowalczyk PabloKowalczyk mentioned this pull request Nov 3, 2023
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.

2 participants