From 810f3df3c484f0bba32c7d0965aea3a043fa2e81 Mon Sep 17 00:00:00 2001 From: Malvika Chauhan Date: Thu, 24 Mar 2022 09:36:05 +0100 Subject: [PATCH 1/5] Configure roave/backward-compatibility-check --- .github/workflows/tests.yaml | 8 ++++++++ composer.json | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 00a823a..6c060b0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,6 +22,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + fetch-depth: 0 - name: Install PHP with extensions uses: shivammathur/setup-php@v2 @@ -34,9 +35,16 @@ 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 + + - name: Check backward compatibility + run: composer backward-compatibility-check + if: matrix.php-version >= 7.4 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" } } From 180c285bb39e7966b0e226f2fd9ee5b48ebe937a Mon Sep 17 00:00:00 2001 From: Malvika Chauhan Date: Thu, 24 Mar 2022 09:37:58 +0100 Subject: [PATCH 2/5] Adding proper fetch-depth --- .github/workflows/tests.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6c060b0..d38b76b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,7 +22,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - fetch-depth: 0 + with: + fetch-depth: 0 - name: Install PHP with extensions uses: shivammathur/setup-php@v2 From b21d2a222dc00404096aab2bb43310a7a9c385d0 Mon Sep 17 00:00:00 2001 From: Malvika Chauhan Date: Mon, 4 Apr 2022 09:43:05 +0200 Subject: [PATCH 3/5] Adding single job for bc checker --- .github/workflows/tests.yaml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d38b76b..909ec99 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -46,6 +46,36 @@ jobs: 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 - if: matrix.php-version >= 7.4 From 27257d5a5ac4a10cd76d2951a57aaeb2d58ce992 Mon Sep 17 00:00:00 2001 From: Malvika Chauhan Date: Mon, 4 Apr 2022 09:44:27 +0200 Subject: [PATCH 4/5] Adding name --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 909ec99..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 From 47b85784bb51adecb76c07fb4423d0f07da55116 Mon Sep 17 00:00:00 2001 From: Malvika Chauhan Date: Mon, 4 Apr 2022 09:48:30 +0200 Subject: [PATCH 5/5] Git ignore for phpunit result cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) 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