From 8fd64a82e63b943babf35fb9ba8babbde60d5e07 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Fri, 24 Apr 2026 16:36:00 +0200 Subject: [PATCH 1/3] Use core matrix --- .github/workflows/ci-linux.yml | 63 ++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index e71eb7e..e46f809 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -16,21 +16,43 @@ concurrency: cancel-in-progress: true jobs: + setup-phpunit-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.gen.outputs.matrix }} + steps: + - uses: actions/checkout@v6 + - id: gen + uses: galette/.github/actions/matrix-generator@main + with: + all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} + + setup-lint-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.gen.outputs.matrix }} + steps: + - uses: actions/checkout@v6 + - id: gen + uses: galette/.github/actions/matrix-generator@main + with: + target: lint + all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} + lint: runs-on: ubuntu-latest - name: "Lint on PHP ${{ matrix.php-versions }}" + needs: setup-lint-matrix + name: "Lint on PHP ${{ matrix.php-version }}" strategy: - matrix: - php-versions: [ '8.3', '8.5' ] - coverage: [none] + matrix: ${{ fromJSON(needs.setup-lint-matrix.outputs.matrix) }} fail-fast: false steps: - name: PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} tools: composer coverage: ${{ matrix.coverage }} @@ -70,7 +92,7 @@ jobs: ../../vendor/bin/phpcs lib/ ./*.php - name: CS Fixer - if: matrix.php-versions == '8.3' + if: matrix.php-is-min run: | cd galette-core/galette/plugins/plugin-helloasso ../../vendor/bin/php-cs-fixer check --show-progress=dots --verbose --diff @@ -96,28 +118,13 @@ jobs: unit-tests: runs-on: ubuntu-latest + needs: setup-phpunit-matrix strategy: - matrix: - include: - #lower php version - - { php-version: "8.3", db-image: "mysql:5.7", coverage: none, always: true } - - { php-version: "8.3", db-image: "mysql:8.4", coverage: none, always: true } - - { php-version: "8.3", db-image: "mariadb:10.6", coverage: none, always: true } - - { php-version: "8.3", db-image: "mariadb:11", coverage: none, always: true } - - { php-version: "8.3", db-image: "postgres:13", coverage: none, always: true } - - { php-version: "8.3", db-image: "postgres:17", coverage: none, always: true } - #higher stable php version - - { php-version: "8.5", db-image: "mysql:5.7", coverage: none, always: true } - - { php-version: "8.5", db-image: "mysql:8.4", coverage: none, always: true } - - { php-version: "8.5", db-image: "mariadb:10.6", coverage: none, always: true } - - { php-version: "8.5", db-image: "mariadb:11", coverage: none, always: true } - - { php-version: "8.5", db-image: "postgres:13", coverage: none, always: true } - - { php-version: "8.5", db-image: "postgres:17", coverage: none, always: true } + matrix: ${{ fromJSON(needs.setup-phpunit-matrix.outputs.matrix) }} fail-fast: false env: - skip: ${{ matrix.always == false && (github.event_name == 'pull_request' || github.repository != 'galette-community/plugin-helloasso' || !(github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags'))) }} DB: ${{ matrix.db-image }} services: @@ -149,17 +156,15 @@ jobs: steps: - name: PHP - if: env.skip != 'true' uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} tools: composer, pecl coverage: ${{ matrix.coverage }} extensions: apcu ini-values: apc.enable_cli=1 - name: "Show versions" - if: env.skip != 'true' run: | php --version composer --version @@ -168,7 +173,6 @@ jobs: docker exec ${{ job.services.db.id }} bash -c "if [[ -n \$(command -v psql) ]]; then psql --version; else if [[ -n \$(command -v mysql) ]]; then mysql --version; else mariadb --version; fi fi" - name: Build Galette - if: env.skip != 'true' uses: galette/.github/actions/build-galette@main with: php-version: ${{ matrix.php-version }} @@ -186,7 +190,7 @@ jobs: cd galette-core bin/console galette:install -v --dbtype=pgsql --dbhost=localhost --dbname=galette_tests --dbuser=galette_tests --dbpass=g@l3tte --admin=admin --password=admin --no-interaction -w bin/console galette:plugins:install-db --all - if: env.skip != 'true' && startsWith(matrix.db-image, 'postgres') + if: startsWith(matrix.db-image, 'postgres') - name: Init for MariaDB run: | @@ -194,10 +198,9 @@ jobs: mysql -e 'create database IF NOT EXISTS galette_tests;' -u galette_tests --password=g@l3tte -h 127.0.0.1 -P 3306 bin/console galette:install -v --dbtype=mysql --dbhost=127.0.0.1 --dbname=galette_tests --dbuser=galette_tests --dbpass=g@l3tte --admin=admin --password=admin --no-interaction -w bin/console galette:plugins:install-db --all - if: env.skip != 'true' && (startsWith(matrix.db-image, 'mysql') || startsWith(matrix.db-image, 'mariadb')) + if: startsWith(matrix.db-image, 'mysql') || startsWith(matrix.db-image, 'mariadb') - name: Unit tests - if: env.skip != 'true' run: | cd galette-core/galette/plugins/plugin-helloasso ../../vendor/bin/phpunit --test-suffix=.php --bootstrap tests/TestsBootstrap.php --no-coverage --process-isolation tests/GaletteHelloasso/ From 890d57356c77e88966348e97a54ce08e7cf87e23 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Fri, 24 Apr 2026 16:52:04 +0200 Subject: [PATCH 2/3] Fix wrong orga --- .github/workflows/ci-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index e46f809..0d4abf8 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -25,7 +25,7 @@ jobs: - id: gen uses: galette/.github/actions/matrix-generator@main with: - all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} + all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette-community/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} setup-lint-matrix: runs-on: ubuntu-latest @@ -37,7 +37,7 @@ jobs: uses: galette/.github/actions/matrix-generator@main with: target: lint - all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} + all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette-commjhnity/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} lint: runs-on: ubuntu-latest From 470c55a2edddf275b9a14be06ae7ecae881199b4 Mon Sep 17 00:00:00 2001 From: Guillaume AGNIERAY <107203963+gagnieray@users.noreply.github.com> Date: Sat, 9 May 2026 15:35:59 +0200 Subject: [PATCH 3/3] Fix typo --- .github/workflows/ci-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 0d4abf8..ed2f3d9 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -37,7 +37,7 @@ jobs: uses: galette/.github/actions/matrix-generator@main with: target: lint - all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette-commjhnity/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} + all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette-community/galette-helloasso' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }} lint: runs-on: ubuntu-latest