Skip to content

Provides an automated process for verifying that code follows all required standards and does not introduce any potential bugs.

License

Notifications You must be signed in to change notification settings

JosephLeedy/github-action-check-code-quality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check Code Quality GitHub Actions Workflow

by Joseph Leedy

Check Code Quality provides an automated process for verifying that code follows all required standards and does not introduce any potential bugs.

Prerequisites

The following tools must installed as development dependencies in your project:

PHP

JavaScript

Usage

Example Workflow

This workflow is intended to be used within another workflow using a configuration similar to this:

name: Check Code Quality

on:
  push:
    branches:
      - 'feature/**'

  workflow_dispatch:

jobs:
  check-code-quality:
    name: Check Code Quality
    uses: JosephLeedy/github-action-check-code-quality/.github/workflows/check-code-quality.yml@main
    with:
      php-version: 8.1
    secrets:
      access-token: ${{ secrets.GITHUB_TOKEN }}

Accepted Inputs

The following parameters can be set by using the with: keyword in your calling workflow:

Name Default Value Required Description
fetch-depth 2 No Number of code revisions to check out ("0" for all1)
base-branch develop No Base Git branch (i.e. "develop" or "main")
node-version 16 No Version of Node.js to use for running JavaScript checks
php-version 7.4 No Version of PHP to use for running PHP checks

1Note: setting a value of "0" for the fetch-depth parameter is not recommended for large repositories as it could adversely impact performance.

Accepted Secrets

The following secrets can be passed by in the secrets: section of your calling workflow:

Name Required Description
access-token Yes GitHub access token
composer-auth-json No Composer auth.json file contents

About

Provides an automated process for verifying that code follows all required standards and does not introduce any potential bugs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published