Skip to content

chore: Update workflows #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2023
Merged
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
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