8000 Refactor GitHub Actions workflows by morozov · Pull Request #6946 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor GitHub Actions workflows #6946

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

Merged
merged 1 commit into from
May 12, 2025

Conversation

morozov
Copy link
Member
@morozov morozov commented May 11, 2025

The problem

If a build with unstable dependencies (e.g. a development PHP version) fails, it fails the entire job (example).

The solution

  1. Introduce a reusable parameterized workflow per driver (e.g. Run "PHPUnit on MySQL")
  2. Reference it from the corresponding job in the "Continuous Integration" workflow; leave only stable dependencies there.
  3. Move the builds against development PHP versions into the nightly workflow; reuse the same per-driver workflows there.

Minor changes

  1. The YAML code is formatted by the rules of this YAML formatter. Excessive double quotes have been removed. Single quotes are used where necessary.
  2. The oci8 and pdo_oci have been combined in a single one with the extension parameter. This is consistent with the rest of the jobs.
  3. The dependency parameter has been renamed to dependency-versions to match the one from ramsey/composer-install
  4. The ibm-db2 job has been renamed to db2 (the product name is Db2); the mssql one has been renamed to sqlserver (this is quite common and matches the platform name).
  5. The "libsqlite" in the job output has been replaced with "SQLite" since there doesn't seem to be such a thing as "libsqlite".
  6. The format of the code coverage file name has been made more consistent across jobs.
  7. The "Create temporary tablespace" step has been moved closer to "Run PHPUnit". This will reduce the likelihood of the job failing because the tablespace is created too early. This may be unnecessary but I saw this failure once even after Revert IBM Db2 health check improvement #6859.

TODO

@morozov morozov force-pushed the workflow-refactoring branch 9 times, most recently from f9ed1dd to 075c68d Compare May 12, 2025 05:06
@morozov morozov force-pushed the workflow-refactoring branch from 075c68d to 3f40fa3 Compare May 12, 2025 05:26
@morozov morozov added the CI label May 12, 2025
@morozov morozov added this to the 3.9.5 milestone May 12, 2025
@morozov morozov marked this pull request as ready for review May 12, 2025 05:33
@morozov morozov requested a review from greg0ire May 12, 2025 05:33
Copy link
Member
@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

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

👌

@morozov morozov merged commit 2565937 into doctrine:3.9.x May 12, 2025
53 checks passed
@morozov morozov deleted the workflow-refactoring branch May 12, 2025 12:19
os:
- ubuntu-24.04
php-version:
- '8.5'
Copy link
Member

Choose a reason for hiding this comment

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

should this use the nightly keyword to reduce maintenance work for that workflow ?

Copy link
Member Author

Choose a reason for hiding this comment

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

If that's the same, yes.

Copy link
Member

Choose a reason for hiding this comment

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

the difference is that nightly will automatically mean PHP 8.6 after the release of PHP 8.5.0 (it always refers to the master branch of PHP).

Actually, 8.5 currently installs the nightly PHP version as 8.5 is not released yet: https://github.com/shivammathur/setup-php?tab=readme-ov-file#tada-php-support

to me, nightly is exactly the intent we want in this nightly.yml job, to avoid having to remember to update it every year.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that was my understanding. Using nightly sounds good. It's more expressive and requires less maintenance.

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

Successfully merging this pull request may close these issues.

3 participants
0