Skip to content
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
75 changes: 19 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,90 +7,53 @@ jobs:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: ['ubuntu-18.04']
operating-system: ['ubuntu-latest']
php-versions: ['7.0']
phpunit-versions: ['7.5.20']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
tools: psalm, phpunit:${{ matrix.phpunit-versions }}

- name: Install dependencies
run: composer self-update --1; composer install
ini-values: max_execution_time=600, memory_limit=256M, error_reporting=-1, display_errors=On
coverage: none

- name: PHPUnit tests
uses: php-actions/phpunit@v2
with:
memory_limit: 256M
- name: Remove psalm
run: composer remove --dev vimeo/psalm

moderate:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.1', '7.2', '7.3']
phpunit-versions: ['latest']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, sodium
ini-values: post_max_size=256M, max_execution_time=180
tools: psalm, phpunit:${{ matrix.phpunit-versions }}

- name: Install dependencies
run: composer install
- name: Install Composer dependencies
run: composer update

- name: PHPUnit tests
uses: php-actions/phpunit@v2
timeout-minutes: 30
with:
memory_limit: 256M
run: vendor/bin/phpunit

modern:
moderate-modern:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['latest']
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, sodium
ini-values: post_max_size=256M, max_execution_time=180
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
ini-values: error_reporting=-1, display_errors=On
coverage: none

- name: Install dependencies
run: composer install
- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"

- name: PHPUnit tests
uses: php-actions/phpunit@v2
timeout-minutes: 30
with:
memory_limit: 256M

- name: Install Psalm
run: composer require --dev vimeo/psalm:^4

- name: Static Analysis
run: vendor/bin/psalm
run: vendor/bin/phpunit
28 changes: 28 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Psalm

on: [push]

jobs:
psalm:
name: Psalm on PHP ${{ matrix.php-versions }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4']
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: psalm:4
coverage: none

- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"

- name: Static Analysis
run: psalm
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"require": {
"php": "^7|^8",
"guzzlehttp/psr7": "^1",
"paragonie/constant_time_encoding": "^2",
"paragonie/sodium_compat": ">= 1.15.4",
"paragonie/constant_time_encoding": "^2|^3",
"paragonie/sodium_compat": ">= 1.15.4 || >= 2.1",
"psr/http-message": "^1"
},
"require-dev": {
"guzzlehttp/guzzle": "^6|^7",
"phpunit/phpunit": "^6|^7|^8|^9",
"phpunit/phpunit": "^6|^7|^8|^9|^10",
"vimeo/psalm": "^2|^3|^4"
},
"suggest": {
Expand Down
32 changes: 12 additions & 20 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="true"
bootstrap="phpunit-autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
>
<testsuites>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" bootstrap="phpunit-autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>