Skip to:
Content

BuddyPress.org

Changeset 13324


Ignore:
Timestamp:
09/11/2022 06:22:23 PM (15 months ago)
Author:
espellcaste
Message:

Testing BuddyPress against its own/new PHP Code Sniffer (PHPCS).

The plugin is using its own custom PHP Code Sniffer (https://github.com/buddypress/bp-coding-standards)

A non-blocking Github Action was introduced to test against this new code sniffer. Actual PHPCS fixes will be introduced in future commits.

Closes https://github.com/buddypress/buddypress/pull/21
See #7228

Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/unit-tests.yml

    r13314 r13324  
    3333
    3434      - name: Checkout repository
    35         uses: actions/checkout@v2
     35        uses: actions/checkout@v3
    3636
    3737      - name: Setup PHP
     
    5252          composer --version
    5353
    54       - name: Validate Composer
    55         run: composer validate --strict
    56 
    5754      - name: Install Composer dependencies
    58         uses: ramsey/composer-install@v1
     55        uses: ramsey/composer-install@v2
    5956        with:
    6057          composer-options: "--ignore-platform-reqs"
     
    8885
    8986      - name: Running single site unit tests
     87        if: ${{ success() || failure() }}
    9088        run: npm run test-php
    91         if: ${{ success() || failure() }}
    9289
    9390      - name: Running multi site unit tests
     91        if: ${{ success() || failure() }}
    9492        run: npm run test-php-multisite
    95         if: ${{ success() || failure() }}
    9693
    9794      - name: Stop Docker environment
     95        if: ${{ success() || failure() }}
    9896        run: npm run wp-env stop
    99         if: ${{ success() || failure() }}
  • trunk/.gitignore

    r13314 r13324  
    2424npm-debug.log
    2525
     26.phpcs/*.json
     27
    2628# The build directory.
    2729build
  • trunk/composer.json

    r13314 r13324  
    3333        }
    3434    },
     35    "repositories": [
     36        {
     37            "url": "https://github.com/buddypress/bp-coding-standards.git",
     38            "type": "git"
     39        }
     40    ],
    3541    "require": {
    3642        "composer/installers": "^1.10.0",
     
    3844    },
    3945    "require-dev": {
    40         "phpcompatibility/phpcompatibility-wp": "^2.1.3",
    41         "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
    42         "squizlabs/php_codesniffer" : "^3.6.0",
    43         "wp-coding-standards/wpcs": "~2.3.0",
     46        "buddypress/bp-coding-standards": "dev-trunk",
    4447        "wp-phpunit/wp-phpunit": "^6.0",
    4548        "yoast/phpunit-polyfills": "^1.0.1"
    4649    },
    4750    "scripts": {
    48         "test": "@php ./vendor/phpunit/phpunit/phpunit"
     51        "test": "@php ./vendor/phpunit/phpunit/phpunit",
     52        "phpcs" : "@php ./vendor/bin/phpcs"
    4953    }
    5054}
Note: See TracChangeset for help on using the changeset viewer.