Problem/Motivation

Let's show folks how to make a DrupalCI build file that doesn't run any tests, but does perform other code-quality tasks.

Proposed resolution

Use https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/gitlab-...

See https://www.drupal.org/project/infrastructure/issues/3265092#comment-149...

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork examples-3014492

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

Mile23 created an issue. See original summary.

mile23’s picture

Status: Active » Needs review
StatusFileSize
new1.91 KB

Adding a CS-only drupalci.yml file. Revert drupalci.yml before committing.

Status: Needs review » Needs work

The last submitted patch, 2: 3014492_2_test_only.patch, failed testing. View results

mile23’s picture

Status: Needs work » Needs review
StatusFileSize
new2.37 KB
new1.16 KB

Forcing a phpcs scan of all files with documentation about it.

mile23’s picture

Status: Needs review » Needs work

The last submitted patch, 4: 3014492_4.patch, failed testing. View results

mile23’s picture

See some analysis about this test result: #2990645-33: "Build Successful" is treated as a test failure

mile23’s picture

The purpose of this issue was to show how to do CS-only tests using drupalci.yml, and to do a proof of concept for the issue mentioned in #7.

We won't have any BC code paths as in #3069389: [Policy, no patch] Determine and document best practices for providing backwards compatibility code paths expected to be removed in the next major version. because the BC in core is provided for applications like this project. To deal with core deprecations within contrib, you just use the new API or whatever.

andypost’s picture

Status: Needs work » Needs review
Related issues: +#3072416: [Meta] Drupal 9 Deprecated Code Report
StatusFileSize
new638 bytes

Let's see current state, we sprinted on #3072416: [Meta] Drupal 9 Deprecated Code Report

Status: Needs review » Needs work

The last submitted patch, 10: 3014492-10.patch, failed testing. View results

jungle’s picture

Version: 8.x-1.x-dev » 3.x-dev
Status: Needs work » Needs review

Should we rename drupalci.yml to drupalci.yml.example, and add a REAMDME? meanwhile, in the README, pointing to the official doc https://www.drupal.org/drupalorg/docs/drupal-ci

Status: Needs review » Needs work

The last submitted patch, 10: 3014492-10.patch, failed testing. View results

andypost’s picture

jungle’s picture

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new2 KB

We should remove simpletests from here as well + add few sniffers from core's file

andypost’s picture

StatusFileSize
new1.2 KB
new3.07 KB

Bit more clean-up

jungle’s picture

Discussed with @andypost on slack, we agreed on removing the customized phpcs.xml.dist and .drupalci.yml, to use the ones in the core. see https://drupal.slack.com/archives/C5Y5E9TBK/p1590565800069200

andypost’s picture

No, phpcs.xml.dist needed as example
But custom drupalci file is pita sync with core for sure

jungle’s picture

The purpose of this issue was to show how to do CS-only tests using drupalci.yml, and to do a proof of concept for the issue mentioned in #7.

See #8, so does this mean nothing to commit/to do further there?

Status: Needs review » Needs work

The last submitted patch, 17: 3014492-17.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

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

vishaljd’s picture

Status: Needs work » Needs review
jungle’s picture

Title: Demo a CS-only DrupalCI build » Adopt Gitlab CI

To me, the documentation of DrupalCI customization is for Core development mainly. Rescope this, and hope that CS violations can be detected via Gitlab CI

Requested access to Gitlab CI #3261803: Using GitLab CI instead of Drupal CI

jungle’s picture

Status: Needs review » Active
jungle’s picture

Version: 3.x-dev » 4.0.x-dev
Component: Testing Example » Other
jungle’s picture

Issue summary: View changes

  • jungle committed 0b74931d on 4.0.x
    Issue #3014492 by jungle: Add .gitlab-cl.yml
    

jungle’s picture

Title: Adopt Gitlab CI » Adopt Gitlab CI and fix CS violations detected
jungle’s picture

  • jungle committed 29b630cb on 4.0.x
    Issue #3014492 by jungle: Adopt Gitlab CI and fix CS violations detected
    
jungle’s picture

Status: Active » Fixed
Issue tags: -needs backport to 7.x-1.x +Needs followup

There are failed tests to be fixed, suppressed temporarily in the .gitlab-ci.yml file with allow_failure: true

jungle’s picture

Status: Fixed » Closed (fixed)

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