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

Added site information to CI and alpha job. #671

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

AlexSkrypnyk
Copy link
Collaborator

@AlexSkrypnyk AlexSkrypnyk commented May 29, 2024

TL;DR Our D11 CI is not in line with D10 CI leading to a coverage gap

The test jobs across D10 and D11 should be handling the same 3 types of releases: current, next and canary. D10 already does this, but D11 does not.

For a different Drupal version at a specific point in time Composer will resolve packages versions according to specific stability available at that time. We set that stability resolution as minimum-stability in composer.json.

For D10, we currently testing exactly that.

For D11 we currently handle "current" as "next" and is missing what is currently set in minimum-stability (the value is alpha) within a beta CI job: the drupal/core-* packages are set as beta in composer.json but other packages could be resolved as alpha.

The table below describes current CI jobs of this project (as of 30 May 2024):

D10 version D10 minimum-stability D11 version D11 minimum-stability
current stable stable beta alpha
next beta beta
canary dev dev dev dev

The table below describes proposed CI jobs of this project (as of 30 May 2024):

D10 version D10 minimum-stability D11 version D11 minimum-stability
current stable stable alpha* alpha*
next beta beta beta beta
canary dev dev dev dev

* These will be changed to stable once D11 stable is out.


This PR straightens things up by introducing a

  • correct "current" job as alpha (per minimum-stability),
  • "next" build as beta, and
  • "canary" build as dev.

It also resets drupal/core-* packages to alpha to follow the minimum-stability currently set to alpha.

Note that as of May 30th 2024, this will install D11 beta because D11 is past alpha, which is an expected and correct behaviour.

Once D11 is stable, we would only have to:

  1. Update minimum-stability: stable in composer.json
  2. Update drupal/core-* versions to ^11 in composer.json
  3. Update the version in CI matrix from alpha to stable.

Changes

  • Added alpha job and updated composer.json to serve alpha for drupal/core-* packages to follow the minimum-stability currently set to alpha.
  • Fixed dev version not being correctly installed for dev job
  • Added installed site status information

@AlexSkrypnyk AlexSkrypnyk self-assigned this May 29, 2024
@AlexSkrypnyk AlexSkrypnyk marked this pull request as draft May 29, 2024 20:31
@AlexSkrypnyk AlexSkrypnyk added PR: DO NOT MERGE Do not merge this pull request PR: Do not review Do not review this pull request labels May 29, 2024
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/11x-add-status-ci branch 2 times, most recently from ede77b7 to 2c61f48 Compare May 29, 2024 20:49
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/11x-add-status-ci branch from 2c61f48 to 288bb0a Compare May 29, 2024 21:06
@AlexSkrypnyk AlexSkrypnyk changed the title Added site information to CI. Added site information to CI and alpha job. May 29, 2024
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/11x-add-status-ci branch from a16f1d4 to df6816c Compare May 29, 2024 21:31
composer --verbose require --no-update drupal/core-recommended:^11@${{ matrix.drupal-release }}
composer --verbose require --no-update --dev drupal/core-dev:^11@${{ matrix.drupal-release }}
# Remove the line below once the package is out of `alpha`.
[[ ${{ matrix.drupal-release }} == 'beta' ]] && composer require chi-teck/drupal-code-generator:^4@alpha
Copy link
Collaborator Author

@AlexSkrypnyk AlexSkrypnyk May 29, 2024

Choose a reason for hiding this comment

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

this is unfortunate but a required temporary hack to unblock beta testing.

if consumer projects want to use minimum-stability: beta before this package is in beta - they can explicitly include this package in their composer.json using exactly this way

- name: Start server
run: |
./vendor/bin/drush runserver "$SIMPLETEST_BASE_URL" &
until curl -s "$SIMPLETEST_BASE_URL"; do true; done > /dev/null

- name: Run a single unit test to verify the testing setup
run: ./vendor/bin/phpunit -c ./web/core $(pwd)/web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
run: ./vendor/bin/phpunit -c ./web/core "$(pwd)/web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just fixing GHA linting issues (using actionlint).

@AlexSkrypnyk AlexSkrypnyk requested a review from leymannx May 29, 2024 21:58
@AlexSkrypnyk AlexSkrypnyk added PR: Needs review Pull request needs a review from assigned developers D11 and removed PR: DO NOT MERGE Do not merge this pull request PR: Do not review Do not review this pull request labels May 29, 2024
@AlexSkrypnyk AlexSkrypnyk marked this pull request as ready for review May 29, 2024 21:59
@AlexSkrypnyk AlexSkrypnyk requested a review from webflo May 29, 2024 22:02
Copy link
Collaborator

@leymannx leymannx left a comment

Choose a reason for hiding this comment

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

Thank you! This looks awesome to me 🤗

@AlexSkrypnyk AlexSkrypnyk merged commit 483f9fb into 11.x Jun 4, 2024
14 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/11x-add-status-ci branch August 14, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D11 PR: Needs review Pull request needs a review from assigned developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants