From 6faf4a72df6e373d96bedb72d8d2df0d31a27114 Mon Sep 17 00:00:00 2001 From: Aneurin Barker Snook Date: Sat, 5 Sep 2026 09:23:55 +0100 Subject: [PATCH 1/2] Add Gitea Actions workflow to run PHPUnit on pull requests Runs the backend test suite against PHP 8.3 for every PR targeting main, so branch protection can require it to pass before merging. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..cfec672 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + pull_request: + branches: [main] + +jobs: + php-tests: + runs-on: ubuntu-latest + container: php:8.3-cli-alpine + steps: + - uses: actions/checkout@v4 + + - name: Install Composer + run: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + + - name: Install dependencies + run: composer install --no-progress --prefer-dist + + - name: Run tests + run: vendor/bin/phpunit -- 2.54.0 From e59890618e3daf7ab4f446ab3f2719c0d5270825 Mon Sep 17 00:00:00 2001 From: Aneurin Barker Snook Date: Sat, 5 Sep 2026 10:32:15 +0100 Subject: [PATCH 2/2] Install Node in the CI job container before checkout actions/checkout is a JS action and needs a node binary on PATH; the php:8.3-cli-alpine job container doesn't ship one, so checkout was failing with "node: executable file not found in $PATH". Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cfec672..a704ea5 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,6 +9,12 @@ jobs: runs-on: ubuntu-latest container: php:8.3-cli-alpine steps: + # actions/checkout is a JS action -- php:8.3-cli-alpine has no node on + # PATH by default, so install it (musl-native, no glibc/Alpine mismatch) + # before any step that needs it. + - name: Install Node + run: apk add --no-cache nodejs + - uses: actions/checkout@v4 - name: Install Composer -- 2.54.0