diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 642d8ea..8ed6e34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,8 @@ jobs: runs-on: ${{ matrix.operating-system }} strategy: matrix: - operating-system: ['ubuntu-16.04'] + operating-system: ['ubuntu-18.04'] php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0'] - phpunit-versions: ['7.5.20'] steps: - name: Checkout uses: actions/checkout@v2 @@ -20,57 +19,28 @@ jobs: 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 }} + ini-values: error_reporting=-1, display_errors=On + coverage: none - - name: Install dependencies - run: composer self-update --1; composer install + - name: Use Composer 1.x + run: composer self-update --1 + + - name: Install Composer dependencies + uses: "ramsey/composer-install@v1" - name: PHPUnit tests - uses: php-actions/phpunit@v2 - with: - memory_limit: 256M + run: vendor/bin/phpunit - moderate: + 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.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: Modernize dependencies - run: composer require --dev "phpunit/phpunit:>=4" + php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - timeout-minutes: 30 - with: - memory_limit: 256M + continue-on-error: ${{ matrix.php-versions == '8.1' }} - 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'] - phpunit-versions: ['latest'] steps: - name: Checkout uses: actions/checkout@v2 @@ -80,23 +50,21 @@ jobs: 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 + ini-values: error_reporting=-1, display_errors=On + coverage: none - name: Modernize dependencies - run: composer require --dev "phpunit/phpunit:>=4" + run: composer require --dev --no-update "phpunit/phpunit:>=4" - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - timeout-minutes: 30 - with: - memory_limit: 256M + - name: Install Composer dependencies (PHP < 8.1) + if: ${{ matrix.php-versions != '8.1' }} + uses: "ramsey/composer-install@v1" - - name: Install Psalm - run: rm composer.lock && composer require --dev vimeo/psalm:^4 + - name: Install Composer dependencies - ignore-platform-reqs (PHP 8.1) + if: ${{ matrix.php-versions == '8.1' }} + uses: "ramsey/composer-install@v1" + with: + composer-options: --ignore-platform-reqs - - name: Static Analysis - run: vendor/bin/psalm + - name: PHPUnit tests + run: vendor/bin/phpunit diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 0000000..43aeeea --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,30 @@ +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@v2 + + - 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@v1" + with: + composer-options: --no-dev + + - name: Static Analysis + run: psalm