Convert to GitlabCI

Created on 20 July 2023, over 1 year ago
Updated 22 August 2023, over 1 year ago

Problem/Motivation

https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...

Gitlab CI is now available.
Drupal CI will ultimately be turned off.

We should move from Drupal CI to Gitlab CI.

Steps to reproduce

N/A

Proposed resolution

Adapt the Drupal Association provided template to use Gitlab CI for this module.

Remaining tasks

  • adopt Gitlab CI
  • disable Drupal CI

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Fixed

Version

3.0

Component

Miscellaneous

Created by

🇬🇧United Kingdom Eli-T Manchester

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Eli-T
  • @eli-t opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇬🇧United Kingdom Eli-T Manchester
  • Status changed to Needs work over 1 year ago
  • 🇬🇧United Kingdom Eli-T Manchester

    Some issues running this pipeline:

    • composer-d9 job fails
    • eslint is skipped
    • phpcs fails
    • phpunit-d9 is skipped

    See https://git.drupalcode.org/project/govuk_notify/-/pipelines/14598

    This branch does not support D9 so that should be trivial to fix.

    The PHPCS issues are as follows.

    $ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source
    FILE: ...odules/govuk_notify_views_backend/src/Plugin/views/filter/Id.php
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
      6 | ERROR | [x] Use statements should be sorted alphabetically. The
        |       |     first wrong one is
        |       |     Drupal\Core\Form\FormStateInterface.
        |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
     17 | ERROR | [ ] Missing member variable doc comment
        |       |     (Drupal.Commenting.VariableComment.Missing)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    FILE: ...es/govuk_notify_views_backend/src/Plugin/views/filter/Status.php
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
      6 | ERROR | [x] Use statements should be sorted alphabetically. The
        |       |     first wrong one is
        |       |     Drupal\Core\Form\FormStateInterface.
        |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
     15 | ERROR | [ ] Missing member variable doc comment
        |       |     (Drupal.Commenting.VariableComment.Missing)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    FILE: ...ules/govuk_notify_views_backend/src/Plugin/views/filter/Type.php
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
      6 | ERROR | [x] Use statements should be sorted alphabetically. The
        |       |     first wrong one is
        |       |     Drupal\Core\Form\FormStateInterface.
        |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
     15 | ERROR | [ ] Missing member variable doc comment
        |       |     (Drupal.Commenting.VariableComment.Missing)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    FILE: ...ify_views_backend/src/Plugin/views/query/GovUKNotifyMessages.php
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
    ----------------------------------------------------------------------
       7 | ERROR   | [x] Use statements should be sorted alphabetically.
         |         |     The first wrong one is
         |         |     Drupal\views\ViewExecutable.
         |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
      22 | ERROR   | [ ] Missing member variable doc comment
         |         |     (Drupal.Commenting.VariableComment.Missing)
      72 | WARNING | [x] '@todo - paging' should match the format '@todo
         |         |     Fix problem X here.'
         |         |     (Drupal.Commenting.TodoComment.TodoFormat)
     111 | WARNING | [x] '@todo - better message here.' should match the
         |         |     format '@todo Fix problem X here.'
         |         |     (Drupal.Commenting.TodoComment.TodoFormat)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    FILE: ...eb/modules/custom/govuk_notify/src/Form/GovUKNotifyAdminForm.php
    ----------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 4 LINES
    ----------------------------------------------------------------------
     47 | ERROR | [x] Array indentation error, expected 8 spaces but
        |       |     found 6 (Drupal.Arrays.Array.ArrayIndentation)
     47 | ERROR | [x] Object operator not indented correctly; expected 8
        |       |     spaces but found 6
        |       |     (Drupal.WhiteSpace.ObjectOperatorIndent.Indent)
     50 | ERROR | [x] Array indentation error, expected 10 spaces but
        |       |     found 8 (Drupal.Arrays.Array.ArrayIndentation)
     50 | ERROR | [x] Object operator not indented correctly; expected 10
        |       |     spaces but found 8
        |       |     (Drupal.WhiteSpace.ObjectOperatorIndent.Indent)
     52 | ERROR | [x] Array indentation error, expected 10 spaces but
        |       |     found 8 (Drupal.Arrays.Array.ArrayIndentation)
     52 | ERROR | [x] Object operator not indented correctly; expected 10
        |       |     spaces but found 8
        |       |     (Drupal.WhiteSpace.ObjectOperatorIndent.Indent)
     54 | ERROR | [x] Array indentation error, expected 10 spaces but
        |       |     found 8 (Drupal.Arrays.Array.ArrayIndentation)
     54 | ERROR | [x] Object operator not indented correctly; expected 10
        |       |     spaces but found 8
        |       |     (Drupal.WhiteSpace.ObjectOperatorIndent.Indent)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    FILE: ...les/custom/govuk_notify/src/NotifyService/GovUKNotifyService.php
    ----------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 9 LINES
    ----------------------------------------------------------------------
       7 | ERROR | [x] Use statements should be sorted alphabetically.
         |       |     The first wrong one is
         |       |     Alphagov\Notifications\Client.
         |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
      14 | ERROR | [ ] Missing member variable doc comment
         |       |     (Drupal.Commenting.VariableComment.Missing)
      32 | ERROR | [x] Case breaking statements must be followed by a
         |       |     single blank line
         |       |     (Squiz.ControlStructures.SwitchDeclaration.SpacingAfterBreak)
      35 | ERROR | [x] Case breaking statements must be followed by a
         |       |     single blank line
         |       |     (Squiz.ControlStructures.SwitchDeclaration.SpacingAfterBreak)
      48 | ERROR | [x] Namespaced classes/interfaces/traits should be
         |       |     referenced with use statements
         |       |     (Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing)
      69 | ERROR | [x] Namespaced classes/interfaces/traits should be
         |       |     referenced with use statements
         |       |     (Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing)
      91 | ERROR | [x] Namespaced classes/interfaces/traits should be
         |       |     referenced with use statements
         |       |     (Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing)
     122 | ERROR | [x] Namespaced classes/interfaces/traits should be
         |       |     referenced with use statements
         |       |     (Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing)
     131 | ERROR | [x] Use null coalesce operator instead of ternary
         |       |     operator.
         |       |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    FILE: .../modules/custom/govuk_notify/src/Plugin/Mail/GovUKNotifyMail.php
    ----------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ----------------------------------------------------------------------
      8 | ERROR | [x] Use statements should be sorted alphabetically. The
        |       |     first wrong one is
        |       |     Drupal\govuk_notify\NotifyService\NotifyServiceInterface.
        |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
     22 | ERROR | [ ] Missing member variable doc comment
        |       |     (Drupal.Commenting.VariableComment.Missing)
     23 | ERROR | [ ] Missing member variable doc comment
        |       |     (Drupal.Commenting.VariableComment.Missing)
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    Time: 237ms; Memory: 6MB
    PHP CODE SNIFFER REPORT SUMMARY
    ----------------------------------------------------------------------
    FILE                                                  ERRORS  WARNINGS
    ----------------------------------------------------------------------
    ...tify_views_backend/src/Plugin/views/filter/Id.php  2       0
    ..._views_backend/src/Plugin/views/filter/Status.php  2       0
    ...fy_views_backend/src/Plugin/views/filter/Type.php  2       0
    ...nd/src/Plugin/views/query/GovUKNotifyMessages.php  2       2
    ...om/govuk_notify/src/Form/GovUKNotifyAdminForm.php  8       0
    ...k_notify/src/NotifyService/GovUKNotifyService.php  9       0
    .../govuk_notify/src/Plugin/Mail/GovUKNotifyMail.php  3       0
    ----------------------------------------------------------------------
    A TOTAL OF 28 ERRORS AND 2 WARNINGS WERE FOUND IN 13 FILES
    ----------------------------------------------------------------------
    PHPCBF CAN FIX 23 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
    ----------------------------------------------------------------------
        SOURCE                                                       COUNT
    ----------------------------------------------------------------------
    [ ] Drupal.Commenting.VariableComment.Missing                    7
    [x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.  6
    [x] Drupal.Arrays.Array.ArrayIndentation                         4
    [x] Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing   4
    [x] Drupal.WhiteSpace.ObjectOperatorIndent.Indent                4
    [x] Drupal.Commenting.TodoComment.TodoFormat                     2
    [x] Squiz.ControlStructures.SwitchDeclaration.SpacingAfterBreak  2
    [x] SlevomatCodingStandard.ControlStructures.RequireNullCoalesc  1
    ----------------------------------------------------------------------
    A TOTAL OF 30 SNIFF VIOLATIONS WERE FOUND IN 8 SOURCES
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 7 MARKED SOURCES AUTOMATICALLY (23 VIOLATIONS IN TOTAL)
    ----------------------------------------------------------------------
  • Status changed to Needs review over 1 year ago
  • 🇬🇧United Kingdom Eli-T Manchester
  • Status changed to Fixed over 1 year ago
  • 🇬🇧United Kingdom Eli-T Manchester
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024