Problem/Motivation

GitLab CI pipelines are currently failing. This includes not just linting jobs (phpcs, cspell, etc), but also phpstan (which can help us catch bugs) and most concerning, the automated tests themselves. We shouldn't be committing anything else to this project until we're sure we're not introducing regressions.

We've opt'ed in to a number of core version combinations, and currently all of those run on every push to every MR. This is generally wasteful of CI cycles. Instead, we can configure those to run manually, so they're trivial to trigger if you're looking at a pipeline, but they don't have to run all the time. The idea is that as an issue is getting close to RTBC / merge-able, we can trigger the full suite of compatibility checks to make sure we're not breaking anything in any of our supported versions.

Speaking of efficiency, we have a lot of tests, including long-running FunctionalJavaScript tests. We can both speed up our pipelines and save total CI time (which is what we're actually paying for), by setting _PHPUNIT_CONCURRENT: 1 to use run-tests.sh to run the test suite in parallel.

Finally, on the 2.0.x branch, we currently support D9 || D10 || D11, but we're only running tests on D10 + D11. So we can add some more core/PHP combinations (all requiring manual trigger) so that it's easy to make sure we're compatible and tests pass everywhere we say we are.

Steps to reproduce

Look at https://git.drupalcode.org/project/address/-/pipelines 😬

Proposed resolution

  1. Get all the automated tests passing in all branches for all versions of core we support.
  2. Define _PHPUNIT_CONCURRENT: 1 everywhere to run our test suite in parallel.
  3. Fix all the linting / validation jobs (cspell, phpcs, etc).
  4. On the 2.0.x branch, although we support D11, since we still support all versions of D10 (and D9), it's cumbersome to "chase HEAD" and resolve every new D11 deprecation. We're not going to be porting that to D12, so it's pointless. Therefore, add a phpstan-baseline-d11.neon file so we can easily put D11-only deprecations there without having to mess with the code.
  5. Let the default 'composer' build run automatically, move all the other core/php combinations to manual triggers.

Remaining tasks

User interface changes

API changes

Data model changes

Original report by @anybody

Fix code style (phpcs. phpstan, styleint, cspell, eslint, ...), see pipeline warnings

Issue fork address-3578759

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

anybody created an issue. See original summary.

igorgoncalves made their first commit to this issue’s fork.

mehak22’s picture

Thanks for opening this issue.

I can see that there is already an issue fork with some commits addressing code style fixes. I will review the existing changes and check the pipeline warnings to identify any remaining issues (phpcs, phpstan, eslint, etc.).

If there are still failing checks, I can help address the remaining code style violations and update the merge request accordingly.

Please let me know if there are specific pipeline failures or tools that should be prioritized.

tbkot made their first commit to this issue’s fork.

tbkot’s picture

Status: Active » Needs review
dww’s picture

Priority: Normal » Major
Status: Needs review » Needs work
Issue tags: -Novice

Fantastic, thanks for working on this, @tbkot! This has been bothering me for months, and I haven't had time to deal with it. 😅 Bumping to major, since IMHO we should resolve this before doing anything else.

MR mostly looks good. I opened a few threads. Once resolved, would happily merge this.

Thanks again!
-Derek

tbkot’s picture

Status: Needs work » Needs review

@dww please, recheck the MRs. All checks should be fixed for 2.1.x and 2.0.x

dww’s picture

Title: Fix code style (phpcs. phpstan, styleint, cspell, eslint, ...) » Fix GitLab pipelines (tests, phpstan, phpcs, cspell) and reduce waste
Issue summary: View changes

  • dww committed 9f349421 on 2.0.x
    task: #3578759 Fix GitLab pipelines (tests, phpstan, phpcs, cspell) and...

  • dww committed acdd3585 on 2.1.x
    task: #3578759 Fix GitLab pipelines (tests, phpstan, phpcs, cspell) and...
anybody’s picture

GREAT to see this committed, thank you all very much for the progress here in the super important address module :)

dww’s picture

Issue summary: View changes
Status: Needs review » Fixed

Merged both MRs. Green pipelines are back, yay! 🎉

Thanks @tbkot for all your help on this! I ended up doing much more work than I had originally intended, but the results are also much better. 😅 I keep learning more tricks to improve .gitab-ci.yml files for Drupal projects. Very happy with how this ended up.

Cheers,
-Derek

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.