From cf978fd30b67f3dc0fd36e10c648207b9c78588d Mon Sep 17 00:00:00 2001 From: Daniel Ronkainen Date: Mon, 9 Mar 2026 19:40:58 +0100 Subject: [PATCH] build: add unit test actions --- .github/workflows/php.yml | 34 ++++++++++++++++++++++++++++++++++ composer.json | 6 ++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..b3fb3fa --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,34 @@ +name: PHP Unitary + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run test suite + run: php vendor/bin/unitary diff --git a/composer.json b/composer.json index 1b99f50..59c1a52 100644 --- a/composer.json +++ b/composer.json @@ -37,8 +37,10 @@ }, "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "2.x-dev", + "dev-develop": "2.x-dev" } }, - "minimum-stability": "dev" + "minimum-stability": "dev", + "prefer-stable": true }