Adopt gitlab CI for testing

Created on 21 November 2023, 7 months ago
Updated 22 November 2023, 7 months ago

Problem/Motivation

Not yet using Gitlab CI.

Steps to reproduce

Proposed resolution

Start using Gitlab CI.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇭🇺Hungary Gábor Hojtsy Hungary

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

Merge Requests

Comments & Activities

  • Issue created by @Gábor Hojtsy
  • Merge request !59Add gitlab CI file with two targets → (Open) created by marvil07
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    8 pass
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    The single Drupal 10 fail is due to placement of the module:

    There was 1 failure:
    1) Drupal\Tests\upgrade_status\Kernel\TwigDeprecationAnalyzerTest::testDeprecationReport
    Failed asserting that two objects are equal.
    --- Expected
    +++ Actual
    @@ @@
     Drupal\upgrade_status\DeprecationMessage Object (
         'message' => 'Twig Filter "deprecatedfilter...71078.'
         'line' => 10
    -    'file' => 'modules/contrib/upgrade_status/tests/modules/upgrade_status_test_twig/templates/test.html.twig'
    +    'file' => 'modules/custom/upgrade_status-3403194/tests/modules/upgrade_status_test_twig/templates/test.html.twig'
     )
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:94
    /builds/issue/upgrade_status-3403194/tests/src/Kernel/TwigDeprecationAnalyzerTest.php:32
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

    While after merging that the test will work, it will not work for future MRs either, so we need to fix the assertion to be more MR-proof.

  • Status changed to Needs work 7 months ago
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    The 9 pipeline had similar fails, but uncovers one more fail point:

    There were 2 failures:
    1) Drupal\Tests\upgrade_status\Functional\UpgradeStatusAnalyzeTest::testAnalyzer
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'The spaceless tag in "modules/contrib/upgrade_status/tests/modules/upgrade_status_test_twig/templates/spaceless.html.twig" at line 2 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead. See https://drupal.org/node/3071078.'
    +'The spaceless tag in "modules/custom/upgrade_status-3403194/tests/modules/upgrade_status_test_twig/templates/spaceless.html.twig" at line 2 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead. See https://drupal.org/node/3071078.'
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:94
    /builds/issue/upgrade_status-3403194/tests/src/Functional/UpgradeStatusAnalyzeTest.php:143
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    2) Drupal\Tests\upgrade_status\Kernel\TwigDeprecationAnalyzerTest::testDeprecationReport
    Failed asserting that an array contains Drupal\upgrade_status\DeprecationMessage Object &0000000040424a40000000000cf51e80 (
        'message' => 'Twig Filter "deprecatedfilter" is deprecated. See https://drupal.org/node/3071078.'
        'line' => 10
        'file' => 'modules/contrib/upgrade_status/tests/modules/upgrade_status_test_twig/templates/test.html.twig'
    ).
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
    /builds/issue/upgrade_status-3403194/tests/src/Kernel/TwigDeprecationAnalyzerTest.php:37
    /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    FAILURES!
  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    PHPLint Failed
  • Status changed to Needs review 7 months ago
  • 🇵🇪Peru marvil07

    @Gábor Hojtsy, it took a few iterations to get it right, but I think the current code in the merge request is now ready for inclusion.

    At tests/modules/upgrade_status_test_error/fatal.php, I added a couple of comments, one for php linting, and the other for coding standards.
    The linting one is the important, that avoids a lint fail, which is expected in that case.
    To avoid it I declared that it should be only linted on versions lower than php 7, and given composer requires higher than php 7 indirectly via dependencies, it basically will not happen ever.

    That last bit needed some changes on UpgradeStatusAnalyzeTest, since a few messages there contain the line number of the parse error.

    Finally, the directory assumptions on test, as you mentioned on #3 and #4, needed a few changes.
    To solve it, I am relying on the extension object related to the module where the tested template lives.

    There are multiple suggestions from phpcs, phpstan, and stylint, but they are all optional, so I have not really dive into them.

    Marking now as NR.

    • 7b3694c2 committed on 4.x
      Issue #3403194 by marvil07, Gábor Hojtsy: Adopt gitlab CI for testing
      
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    Landed in 4.x, thanks for the fantastic work on this!

    Now trying to backport to 3.x. I think the getPath() may need to be rewritten as drupal_get_path(), but let's make the tests tell us that :D

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    run-tests.sh fatal error
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    run-tests.sh fatal error
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    run-tests.sh fatal error
    • 1de81956 committed on 8.x-3.x
      Issue #3403194 by marvil07, Gábor Hojtsy: Adopt gitlab CI for testing
      
  • Status changed to Fixed 7 months ago
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    I checked and the extension class based path methods are already used, so that should be fine. Committed to 3.x. Thanks!

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

Production build 0.69.0 2024