-
Notifications
You must be signed in to change notification settings - Fork 33
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
Showing
4 changed files
with
120 additions
and
90 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,58 @@ | ||
name: PHPUnit | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
phpunit: | ||
name: "${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# normal, highest, non-dev installs | ||
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] | ||
composer-options: ['--prefer-stable'] | ||
dependency-versions: ['highest'] | ||
include: | ||
# testing lowest PHP version with lowest dependencies | ||
- php-version: '7.2.5' | ||
dependency-versions: 'lowest' | ||
composer-options: '--prefer-lowest' | ||
|
||
# testing dev versions with highest PHP | ||
- php-version: '8.2' | ||
dependency-versions: 'highest' | ||
composer-options: '' # allow dev deps | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Composer install" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependency-versions }}" | ||
composer-options: "--prefer-dist --no-progress" | ||
|
||
- name: Unit Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit | ||
|
||
- name: Functional Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional | ||
|
||
- name: Integration Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration | ||
|
||
- name: Acceptance Tests | ||
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite acceptance |
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,57 @@ | ||
name: Static | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
release: | ||
|
||
jobs: | ||
composer-validate: | ||
name: Validate composer.json | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate | ||
run: composer validate --strict | ||
|
||
php-cs-fixer: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
tools: php-cs-fixer | ||
|
||
- name: Run PHP-CS-Fixer | ||
run: php-cs-fixer fix --dry-run --diff | ||
|
||
psalm: | ||
name: Psalm | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
tools: psalm:4 | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader | ||
|
||
- name: Run Psalm | ||
run: psalm --output-format=github --php-version=8.0 -c $GITHUB_WORKSPACE/psalm.xml |
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