Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Github action for DrupalQA image

License

NotificationsYou must be signed in to change notification settings

hussainweb/drupalqa-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Super-LinterCICheck dist/CodeQLCoverage

This action runs checks fromDrupalQAon a Drupal codebase. While you can directly use the Docker image with GitHubActions, this Action makes it simpler to specify and configure some of thechecks.

Inputs

php-version

The PHP version to use (corresponds to the Docker image). Allowed options andtheir corresponding Docker images are as follows. Default:8.4.

php-versionDocker image
7.3hussainweb/drupalqa:php7.3 (not supported)
7.4hussainweb/drupalqa:php7.4 (not supported)
8.0hussainweb/drupalqa:php8.0 (not supported)
8.1hussainweb/drupalqa:php8.1 (not supported)
8.2hussainweb/drupalqa:php8.2
8.3hussainweb/drupalqa:php8.3
8.4hussainweb/drupalqa:php8.4
latesthussainweb/drupalqa:latest

Note: The actual Docker image used also depends on theregistry option. Ifthat option is set to'ghcr' (default value), then the Docker image isprefixed withghcr.io/. For example,ghcr.io/hussainweb/drupalqa:php8.2.

web-root

The web root (document root) for default values for some of the checks. Default:web.

checks

A YAML string describing the checks to run. The default structure is as below.

checks:|  phplint: {}  phpcs: {}

The options for each of these are described in theDrupalQA checks section.

registry

The registry to use to download the image. Onlyghcr anddockerhub aresupported. You probably don't need to change this option. It's only there tocompare the performance and switch to DockerHub in case there is a problem withghcr.io (which is unlikely). Default:ghcr.

Outputs

No outputs.

Example usage

uses:hussainweb/drupalqa@v1with:php-version:8.4checks:|    phplint: {}    phpcs:      standard: phpcs.xml    phpmd:      ruleset: phpmd.xml

DrupalQA Checks

DrupalQA action supports configuring checks for the following tools.

phplint

These are the default options forphplint.

checks:|  phplint:    exclude: vendor,web/core,web/modules/contrib    extensions: php,module,theme,engine,inc,install    verbose: ''    path: ''

In the above sample, the paths begin withweb as it is the default forweb-root input. The actual default will depend on theweb-root input.

phplint supports a.phplint.yml and can be run without any options. If youare using this, you can pass in theno_default_options option as follows.

checks:|  phplint:    no_default_options:true

If you set this option to true, all other options are ignored.

phpcs

These are the default options forphpcs. All are optional and you can overridethese as per thecommand line options of phpcs.

checks:|  phpcs:    standard: Drupal,DrupalPractice    extensions: php,module,inc,install,test,profile,theme    ignore: ''    path: web/modules/custom

In the above sample, the path begins withweb as it is the default forweb-root input. The actual default will depend on theweb-root input.

You can specify multiple paths by separating them with a comma.

checks:|  phpcs:    standard: Drupal,DrupalPractice    path: web/modules/custom,web/themes/custom

phpmd

These are the default options forphpmd. All are optional and you can overridethese as per thecommand line options of phpmd.

checks:|  phpmd:    path: web/modules/custom    format: text    ruleset: codesize,naming,unusedcode    suffixes: php,module,theme,engine,inc    exclude: ''

In the above sample, the path begins withweb as it is the default forweb-root input. The actual default will depend on theweb-root input.

grumphp

These are the default options forgrumphp. All are optional and you canoverride these as per thecommand line options ofgrumphp run.

checks:|  grumphp:    testsuite: ''    tasks: []

This runsgrumphp run on the codebase.

phpstan

These are the default options forphpstan. All are optional and you canoverride these as per thecommand line options ofphpstan.

checks:|  phpstan:    configuration: ''    paths: []

This runsphpstan on the codebase with the specified options. For the defaultsto work, you must have aphpstan.neon configuration file in your codebase asmentioned in the documentation.Note that the defaultphpstan.neon as generated byaxelerant/drupal-quality-checkeris valid for this purpose.

custom

This allows you to run any arbitrary commands that you may want to run fromwithin the tools that are available within the Docker image. This is useful ifyou want to run one of the tools available in the drupalqa Docker image butthere is no custom check written above, or if you want to use a configurationoption not available above. In any case, if you think what you are trying to runhere is common enough, consider submitting an issue and/or a pull request to addthe check. Look at other pull requests such as #121 and #122 to see how to writea check.

Example usage:

checks:|  custom_linters:    command: ['grumphp', 'run', '--testsuite=linters']  custom_stylecheck:    command: ['grumphp', 'run', '--testsuite=style']

The above will run two commands as shown. Thecustom check was introduced forsituations where we need to run the same command twice with different options.This is otherwise not possible using the typical check format as keys may not berepeated in YAML.

About

Github action for DrupalQA image

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp