forked from nicolaswurtz/chordpro-php
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code quality workflow and update composer.json. Also add data-cho…
…rd attribute.
- Loading branch information
1 parent
e40e3bc
commit cb7ac26
Showing
6 changed files
with
100 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: PHP Composer | ||
|
||
on: | ||
push: | ||
branches: [ "master", "develop" ] | ||
pull_request: | ||
branches: [ "master", "develop" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Run test suite | ||
run: composer run-script test | ||
|
||
- name: Run phpcs | ||
run: composer run-script cs | ||
|
||
- name: Run phpstan | ||
run: composer run-script phpstan | ||
|
||
- name: Run php-compatibility | ||
run: composer run-script php-compatibility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,19 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"scripts": { | ||
"test": "phpunit tests", | ||
"phpstan": "phpstan analyse", | ||
"php-compatibility": "phpcs --standard=phpcs.xml", | ||
"cs": "php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff", | ||
"cs-fix": "php-cs-fixer fix --config=.php-cs-fixer.php", | ||
"check": [ | ||
"@test", | ||
"@phpstan", | ||
"@php-compatibility", | ||
"@cs" | ||
] | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"phpstan/extension-installer": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters