diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 819b7fb..ebd42fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,10 @@ jobs: name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }} strategy: + fail-fast: false 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,54 +20,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: max_execution_time=600, memory_limit=256M, 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 }} + php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] - - name: Install dependencies - run: composer install + continue-on-error: ${{ matrix.php-versions == '8.1' }} - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - timeout-minutes: 30 - with: - memory_limit: 256M - - 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 @@ -77,20 +51,18 @@ 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 }} + ini-values: error_reporting=-1, display_errors=On + coverage: none - - name: Install dependencies - run: composer install + - name: Install Composer dependencies (PHP < 8.1) + if: ${{ matrix.php-versions != '8.1' }} + uses: "ramsey/composer-install@v1" - - name: PHPUnit tests - uses: php-actions/phpunit@v2 - timeout-minutes: 30 + - name: Install Composer dependencies - ignore-platform-reqs (PHP 8.1) + if: ${{ matrix.php-versions == '8.1' }} + uses: "ramsey/composer-install@v1" with: - memory_limit: 256M + composer-options: --ignore-platform-reqs - - name: Install Psalm - run: composer require --dev vimeo/psalm:^4; cp psalm-above-3.xml psalm.xml - - - 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..9c19816 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,33 @@ +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: Put Psalm config in place + run: cp psalm-above-3.xml psalm.xml + + - name: Static Analysis + run: psalm