From 5d5b6032cc90de41e0822201f1b78a1695cea4fb Mon Sep 17 00:00:00 2001 From: Miki Palet <64255955+mikipalet@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:47:36 +0100 Subject: [PATCH 1/2] fix: run tests before publishing in generate workflow The generate workflow had no test verification before publishing. A broken regeneration would ship without any validation. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/generate.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 067f6ef..854171e 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -50,6 +50,12 @@ jobs: --git-user-id=getlate-dev \ --git-repo-id=late-php + - name: Install dependencies + run: composer install --no-interaction + + - name: Run tests + run: ./vendor/bin/phpunit + - name: Check for changes id: changes run: | From 893ce96a1bd27263b715f588cc3e8a1b7595b616 Mon Sep 17 00:00:00 2001 From: Miki Palet <64255955+mikipalet@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:51:05 +0100 Subject: [PATCH 2/2] ci: add CI workflow to run build and tests on PRs Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..710083f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer + + - name: Install dependencies + run: composer install --no-interaction + + - name: Run tests + run: ./vendor/bin/phpunit