From a04f7b7341f292ba55f14abe5ab58cf753162bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sun, 1 Oct 2023 08:54:07 +0200 Subject: [PATCH 1/3] chore: Fix Bamarni plugin deprecations --- composer.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/composer.json b/composer.json index 96f28b0a..39c63680 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,10 @@ "extra": { "branch-alias": { "dev-master": "0.4-dev" + }, + "bamarni": { + "bin-links": false, + "forward-command": false } }, "minimum-stability": "dev" From 053c611f99e9eff6dd7c3d56c7422e6e250448eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sun, 1 Oct 2023 09:08:49 +0200 Subject: [PATCH 2/3] ci: Introduce a meta job for the tests When adding GitHub protection rules for a job, one needs to select the jobs based on the name, for example here "coding standards / coding standards". However, for jobs that are issued from a matrix, like here the unit test, one needs to add "unit tests / PHP 8.1 - Symfony 5.4.* - Composer --prefer-stable", "unit tests / PHP 8.2 - Symfony 5.4.* - Composer --prefer-stable" and co. manually. This is both tedious to add and to keep up to date as any change in the matrix result in this rule to be outdated. This PR introduces a very simple solution: have a meta job that passes if and only if all of the unit tests passes. This way we can have a rule for this job instead, which has a fixed label. --- .github/workflows/unit-tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5f61b545..a53653e8 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -66,3 +66,21 @@ jobs: - name: clear docker volumes if: ${{ always() }} run: dev/bin/docker-compose down --volumes + + + # This is a "trick", a meta task which does not change, and we can use in + # the protected branch rules as opposed to the individual tests which + # may change regularly. + validate-tests: + name: tests status + runs-on: ubuntu-latest + needs: [ tests ] + if: always() + steps: + - name: Successful run + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + + - name: Failing run + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 From 94e4e11e6f0ebfb158f7c398fb2e7efea43a5593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sat, 14 Oct 2023 11:10:30 +0200 Subject: [PATCH 3/3] remove bamarni/composer-bin-plugin --- composer.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 526bf61c..19c7eb4d 100644 --- a/composer.json +++ b/composer.json @@ -40,18 +40,11 @@ "psr-4": { "League\\Bundle\\OAuth2ServerBundle\\Tests\\": "tests/" } }, "config": { - "sort-packages": true, - "allow-plugins": { - "bamarni/composer-bin-plugin": true - } + "sort-packages": true }, "extra": { "branch-alias": { "dev-master": "0.4-dev" - }, - "bamarni": { - "bin-links": false, - "forward-command": false } }, "minimum-stability": "dev"