diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 00a823a..6c29e34 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: test: - name: PHP ${{ matrix.php-version }} + name: PHP ${{ matrix.php-version }} test runs-on: ubuntu-18.04 @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Install PHP with extensions uses: shivammathur/setup-php@v2 @@ -34,9 +36,46 @@ jobs: uses: ramsey/composer-install@v1 with: composer-options: --prefer-dist + if: matrix.php-version > 7.1 - name: Run Tests run: composer tests + if: matrix.php-version > 7.1 - name: Check coding style run: composer coding-style + if: matrix.php-version > 7.1 + + bc-checker: + name: PHP ${{ matrix.php-version }} bc-checker + + runs-on: ubuntu-18.04 + + strategy: + fail-fast: false + matrix: + php-version: + - 7.4 + - 8.0 + - 8.1 + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: pcov + tools: composer:v2 + + - name: Install Composer dependencies + uses: ramsey/composer-install@v1 + with: + composer-options: --prefer-dist + + - name: Check backward compatibility + run: composer backward-compatibility-check diff --git a/.gitignore b/.gitignore index 3d2e854..061d072 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock example.php atlassian-ide-plugin.xml build/* +.phpunit.result.cache diff --git a/composer.json b/composer.json index 303c363..49c84c5 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,8 @@ }, "require-dev": { "internations/kodierungsregelwerksammlung": "~0.35", - "phpunit/phpunit": "~7 || ~8 || ~9" + "phpunit/phpunit": "~7 || ~8 || ~9", + "roave/backward-compatibility-check": "^3 || ^4 || ^5 || ^6" }, "autoload": { "psr-0": { @@ -50,6 +51,7 @@ }, "scripts": { "tests": "phpunit", - "coding-style": "phpcs --standard=vendor/internations/kodierungsregelwerksammlung/ruleset.xml ./src/" + "coding-style": "phpcs --standard=vendor/internations/kodierungsregelwerksammlung/ruleset.xml ./src/", + "backward-compatibility-check": "roave-backward-compatibility-check" } }