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
24 changes: 2 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ jobs:
fail-fast: false
matrix:
php:
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"

steps:
- name: Checkout repository
Expand All @@ -54,26 +50,10 @@ jobs:
- name: Ensure source code is linted
run: composer exec phpcs -- src/

- name: Remove uncompliant statements in legacy code
if: contains(fromJson('["5.6", "7.0"]'), matrix.php)
run: |
# Replace string in files
string=': void'
grep -r -l "$string" tests/ | xargs sed -i "s/$string//g"

- name: Set ReportPortal configuration
# ReportPortal agent only works for PHP 7.1, 7.2, 7.3 and 7.4
if: (github.ref_name == 'main' || github.ref_name == 'develop') && vars.REPORT_PORTAL_ENABLED == 'true' && contains(fromJson('["7.1", "7.2", "7.3", "7.4"]'), matrix.php)
run: ./tests/reportportal/reportportal_conf.sh
env:
REPORT_PORTAL_API_KEY: ${{ secrets.REPORT_PORTAL_API_KEY }}
REPORT_PORTAL_ENDPOINT: ${{ vars.REPORT_PORTAL_ENDPOINT }}
PHP_VERSION: ${{ matrix.php }}

- name: PHPUnit
run: |
case ${{ matrix.php }} in
8.1|8.2|8.3 ) composer exec phpunit -- --configuration phpunit.ci.8.xml --coverage-xml ./.coverage;;
8.1|8.2|8.3|8.4 ) composer exec phpunit -- --configuration phpunit.ci.8.xml --coverage-xml ./.coverage;;
*) composer exec phpunit -- --configuration phpunit.ci.xml --coverage-xml ./.coverage;;
esac
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function testEligibilityDto()
public function testSetInvalidInstallmentsCountThrowsException()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage("Installments count must be between 1 and 12.");
new EligibilityQueryDto(13);
$this->expectExceptionMessage("Installments count must be positive.");
new EligibilityQueryDto(-1);
}

public function testSetNegativeDeferredDaysThrowsException()
Expand Down
Loading