-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f17380f
commit c2cd2a3
Showing
1 changed file
with
74 additions
and
0 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,74 @@ | ||
name: PHP Checks | ||
|
||
on: | ||
push: | ||
branches: ["trunk", "develop"] | ||
pull_request: | ||
branches: ["trunk", "develop"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
PHP_VERSION: ${{ env.PHP_EXTENSIONS }} | ||
|
||
jobs: | ||
lint: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP with composer v2 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_EXTENSIONS }} | ||
tools: composer:v2 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Run PHPCS | ||
run: composer run lint | ||
|
||
static-analysis: | ||
name: Static Analysis | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP with composer v2 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_EXTENSIONS }} | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-suggest | ||
|
||
- name: Run PHPStan | ||
run: composer run static | ||
|
||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP with composer v2 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_EXTENSIONS }} | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-suggest | ||
|
||
- name: Run PHPUnit | ||
run: composer run test |