Skip to content

Commit

Permalink
chore: Update workflows (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra authored Dec 1, 2023
1 parent 68efbae commit 43928a7
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 14 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Check Coding Standards"

on:
pull_request:

jobs:
coding-standards:
name: "Check Coding Standards"

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer:v2, cs2pr

- name: Install dependencies
run: composer require phpcsstandards/php_codesniffer --no-interaction --no-progress

- name: "Run phpcs"
run: vendor/bin/phpcs -q --standard=PSR2 classes/ tests/ --report=checkstyle | cs2pr
26 changes: 26 additions & 0 deletions .github/workflows/phpmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Check phpmd"

on:
pull_request:

jobs:
coding-standards:
name: "Check phpmd"

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer:v2

- name: Install dependencies
run: composer require phpmd/phpmd --no-interaction --no-progress

- name: Run phpmd
run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode
29 changes: 29 additions & 0 deletions .github/workflows/test-flight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Check test-flight"

on:
pull_request:

jobs:
coding-standards:
name: "Check test-flight"

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer:v2
ini-values: "zend.assertions=1"

- name: Install dependencies
run: composer require cundd/test-flight --no-interaction --no-progress

- name: Run test-flight
run: |
vendor/bin/test-flight README.md
vendor/bin/test-flight classes/
16 changes: 2 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
name: Mockery ${{ matrix.mockery-version }} on PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -136,19 +136,7 @@ jobs:
ini-values: zend.assertions=1

- name: Install Dependencies
run: composer require mockery/mockery:~${{ matrix.mockery-version }} squizlabs/php_codesniffer phpmd/phpmd cundd/test-flight
run: composer require mockery/mockery:~${{ matrix.mockery-version }} --no-interaction --no-progress

- name: PHPUnit
run: vendor/bin/phpunit

- name: Test Flight
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3'
run: |
vendor/bin/test-flight README.md
vendor/bin/test-flight classes/
- name: PHPCS
run: vendor/bin/phpcs --standard=PSR2 classes/ tests/

- name: PHPMD
run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode

0 comments on commit 43928a7

Please sign in to comment.