Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PHPCS check
on:
push

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
phpcs:
name: PHPCS check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
ini-values: "memory_limit=1G"
coverage: none
tools: cs2pr

- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"

- name: Run PHPCS checks
continue-on-error: true
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml

- name: Show PHPCS results in PR
run: cs2pr ./phpcs-report.xml
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![PHPCS](https://github.com/woocommerce/wc-smooth-generator/actions/workflows/phpcs.yml/badge.svg)](https://github.com/woocommerce/wc-smooth-generator/actions/workflows/phpcs.yml)

# WooCommerce Smooth Generator
A smooth products, customer and order generator using WP-CLI. Future versions will include scheduled auto generation functionality.

Expand Down