From a45122456e0e6e63f83cf7fd084c4bb83e0894aa Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Wed, 15 Apr 2026 10:30:54 +0200 Subject: [PATCH 1/4] feat: re enable CI --- .github/workflows/ci.yml | 124 +++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 084f2435a..e744667c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,65 +1,65 @@ -# name: CI +name: CI -# on: -# push: -# branches: -# - deploy-v3 -# pull_request: ~ -# workflow_dispatch: ~ +on: + push: + branches: + - deploy-v3 + pull_request: ~ + workflow_dispatch: ~ -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true -# jobs: -# tests: -# name: Tests -# runs-on: ubuntu-latest -# permissions: -# contents: 'read' -# id-token: 'write' -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# - name: Pull images -# run: docker compose pull --ignore-pull-failures || true -# - name: Start services -# run: docker compose up --build -d -# - name: Wait for services -# run: | -# while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker compose ps -q php)")"; do -# case $status in -# starting) sleep 1;; -# healthy) exit 0;; -# unhealthy) -# docker compose ps -# docker compose logs -# exit 1 -# ;; -# esac -# done -# exit 1 -# - name: Check HTTP reachability -# run: curl -v -o /dev/null http://localhost -# - name: Check API reachability -# run: curl -vk -o /dev/null https://localhost -# - name: Check PWA reachability -# run: "curl -vk -o /dev/null -H 'Accept: text/html' https://localhost" -# - name: Create test database -# run: | -# docker compose exec -T php bin/console -e test doctrine:database:create -# docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction -# - name: PHPUnit -# run: docker compose exec -T php bin/phpunit -# - name: Doctrine Schema Validator -# run: docker compose exec -T php bin/console doctrine:schema:validate -# - name: Psalm -# run: docker compose exec -T php vendor/bin/psalm -# # gcloud does not work with Python 3.10 because collections. Mappings were removed in Python 3.10. -# - uses: actions/setup-python@v4 -# with: -# python-version: 3.9.15 -# - name: Setup gcloud -# uses: google-github-actions/setup-gcloud@v1 -# - name: Lint Helm -# run: helm lint ./helm/api-platform/ +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Pull images + run: docker compose pull --ignore-pull-failures || true + - name: Start services + run: docker compose up --build -d + - name: Wait for services + run: | + while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker compose ps -q php)")"; do + case $status in + starting) sleep 1;; + healthy) exit 0;; + unhealthy) + docker compose ps + docker compose logs + exit 1 + ;; + esac + done + exit 1 + - name: Check HTTP reachability + run: curl -v -o /dev/null http://localhost + - name: Check API reachability + run: curl -vk -o /dev/null https://localhost + - name: Check PWA reachability + run: "curl -vk -o /dev/null -H 'Accept: text/html' https://localhost" + - name: Create test database + run: | + docker compose exec -T php bin/console -e test doctrine:database:create + docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction + - name: PHPUnit + run: docker compose exec -T php bin/phpunit + - name: Doctrine Schema Validator + run: docker compose exec -T php bin/console doctrine:schema:validate + - name: Psalm + run: docker compose exec -T php vendor/bin/psalm + # gcloud does not work with Python 3.10 because collections. Mappings were removed in Python 3.10. + - uses: actions/setup-python@v4 + with: + python-version: 3.9.15 + - name: Setup gcloud + uses: google-github-actions/setup-gcloud@v1 + - name: Lint Helm + run: helm lint ./helm/api-platform/ From 91e3d986fbd15394cad561780deea3e60a19c2e4 Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Wed, 15 Apr 2026 11:30:49 +0200 Subject: [PATCH 2/4] fix(ci): update CI env variable and docker-compose secrets config --- .github/workflows/ci.yml | 2 ++ docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e744667c2..ab9d64f85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ jobs: permissions: contents: 'read' id-token: 'write' + env: + GITHUB_KEY: ${{ secrets.GH_KEY }} steps: - name: Checkout uses: actions/checkout@v3 diff --git a/docker-compose.yml b/docker-compose.yml index 4f48d9866..5e269a242 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -88,4 +88,4 @@ volumes: secrets: GITHUB_KEY: - file: ./secret_github_key + environment: GITHUB_KEY From bb67891312eefc45d30e9ed3af14988f6e2c5d16 Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Wed, 15 Apr 2026 11:45:09 +0200 Subject: [PATCH 3/4] fix(test): remove mercure true from Greeting #[ApiResource] --- api/src/Entity/Greeting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Entity/Greeting.php b/api/src/Entity/Greeting.php index 93c831a4d..4e1d1aa92 100644 --- a/api/src/Entity/Greeting.php +++ b/api/src/Entity/Greeting.php @@ -9,7 +9,7 @@ /** * This is a dummy entity. Remove it! */ -#[ApiResource(mercure: true)] +#[ApiResource] #[ORM\Entity] class Greeting { From 790aefc0181c320fdc31bd866ea8c0d843c63a6c Mon Sep 17 00:00:00 2001 From: Maxcastel Date: Wed, 15 Apr 2026 11:50:58 +0200 Subject: [PATCH 4/4] fix(ci): remove Psalm --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab9d64f85..772bc1153 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,6 @@ jobs: run: docker compose exec -T php bin/phpunit - name: Doctrine Schema Validator run: docker compose exec -T php bin/console doctrine:schema:validate - - name: Psalm - run: docker compose exec -T php vendor/bin/psalm # gcloud does not work with Python 3.10 because collections. Mappings were removed in Python 3.10. - uses: actions/setup-python@v4 with: