Skip to content

Commit

Permalink
[ci] housekeeping (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow authored Jan 4, 2023
1 parent 3b13947 commit 72fcee9
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 90 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/ci.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/phpunit.yml
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
57 changes: 57 additions & 0 deletions .github/workflows/static.yaml
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
5 changes: 5 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,10 @@
<file name="src/DependencyInjection/SymfonyCastsVerifyEmailExtension.php"/>
</errorLevel>
</PossiblyNullArgument>
<TooManyArguments>
<errorLevel type="suppress">
<file name="src/Model/VerifyEmailSignatureComponents.php"/>
</errorLevel>
</TooManyArguments>
</issueHandlers>
</psalm>

0 comments on commit 72fcee9

Please sign in to comment.