From b39222ae0edabc4e2ab235b91377a2c91dc1e2d9 Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Mon, 28 Sep 2026 19:16:34 -0400 Subject: [PATCH 1/2] Run CI on pull requests and by hand, not on branch pushes --- .github/workflows/laravel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 1e31904..fafba77 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -4,6 +4,7 @@ on: pull_request: branches: [ master ] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 35e3c1eeea6a8d57d7bc24a969511b92a15551d5 Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Mon, 28 Sep 2026 20:10:43 -0400 Subject: [PATCH 2/2] Replace the application CI template with checks a package without tests can pass --- .github/workflows/laravel.yml | 42 +++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index fafba77..496599f 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -1,28 +1,36 @@ -name: Laravel +name: Checks +# lacommerce has no test suite yet, so there is nothing for PHPUnit to run. This gates what can +# be checked without one: a valid composer.json, and every PHP file parsing. When tests land, +# add a Testbench job here and it becomes a required check through the org's ruleset script. on: pull_request: - branches: [ master ] - + branches: [master] workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -jobs: - laravel-tests: +permissions: + contents: read +jobs: + checks: + name: Composer validate ยท PHP syntax runs-on: ubuntu-latest - timeout-minutes: 15 - + timeout-minutes: 10 steps: - - uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2 - - name: Copy .env - run: php -r "file_exists('.env') || copy('.env.example', '.env');" - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - - name: Execute tests (Unit and Feature tests) via PHPUnit - env: - DB_CONNECTION: sqlite - DB_DATABASE: database/database.sqlite - run: vendor/bin/phpunit + - uses: actions/checkout@v7 + + - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: + php-version: '8.4' + coverage: none + tools: composer + + - name: Validate composer.json + run: composer validate --no-check-publish --no-check-lock + + - name: Check PHP syntax + run: find src config database -name '*.php' -print0 | xargs -0 -n1 php -l