From b1bc7dd1413e7c337059fe306b400d0bebc09c6e Mon Sep 17 00:00:00 2001 From: Andrew Masiye Date: Mon, 14 Sep 2026 05:29:00 +0200 Subject: [PATCH] ci: validate console against published editor 0.5.1 --- .github/workflows/ci.yml | 90 ++++++++++++++++++++++++++++++++++++++++ composer.json | 2 +- composer.lock | 14 +++---- 3 files changed, 98 insertions(+), 8 deletions(-) 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..a8bd2c3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,90 @@ +name: CI + +on: + pull_request: + push: + branches: + - develop + - main + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + quality: + name: Composer, syntax, PHPStan and audit + runs-on: ubuntu-24.04 + timeout-minutes: 15 + + steps: + - name: Check out Console + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up PHP 8.4 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 + with: + php-version: '8.4' + extensions: mbstring + coverage: none + tools: composer:v2 + + - name: Validate Composer metadata + run: composer validate --strict + + - name: Install locked dependencies + run: composer install --no-interaction --prefer-dist --no-progress + + - name: Check platform requirements + run: composer check-platform-reqs + + - name: Check PHP 8.4 source syntax + run: | + find src tests -type f -name '*.php' -print0 | xargs -0 -n1 php -l + php -l bin/ichiloto + + - name: Run PHPStan + run: composer analyse -- --no-progress + + - name: Audit locked dependencies + run: composer audit --locked --no-interaction + + tests: + name: Tests (${{ matrix.os }}, PHP ${{ matrix.php }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + php: '8.4' + - os: ubuntu-24.04 + php: '8.5' + - os: macos-15 + php: '8.4' + + steps: + - name: Check out Console + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up PHP ${{ matrix.php }} + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 + with: + php-version: ${{ matrix.php }} + extensions: mbstring + coverage: none + tools: composer:v2 + + - name: Install locked dependencies + run: composer install --no-interaction --prefer-dist --no-progress + + - name: Run portable test suite + run: composer test diff --git a/composer.json b/composer.json index 66e31f9..381c4e1 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "symfony/console": "^8.0", "laravel/prompts": "^0.3.1", "league/climate": "^3.8", - "ichiloto/editor": "^0.5", + "ichiloto/editor": "^0.5.1", "amasiye/figlet": "^1.2.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index ce9e202..05fcd72 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0c7cf79e85cb28b1f817bb2838847a59", + "content-hash": "d695e4a5b279c73ec0af165be40b71fe", "packages": [ { "name": "amasiye/figlet", @@ -256,16 +256,16 @@ }, { "name": "ichiloto/editor", - "version": "0.5.0", + "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/ichiloto/editor.git", - "reference": "7d879af522499686d2e2226cc79816ff790cff39" + "reference": "708a41988010ce37ee9d3234bb3886093db409bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ichiloto/editor/zipball/7d879af522499686d2e2226cc79816ff790cff39", - "reference": "7d879af522499686d2e2226cc79816ff790cff39", + "url": "https://api.github.com/repos/ichiloto/editor/zipball/708a41988010ce37ee9d3234bb3886093db409bc", + "reference": "708a41988010ce37ee9d3234bb3886093db409bc", "shasum": "" }, "require": { @@ -301,9 +301,9 @@ "description": "A simple TUI editor for the ichiloto game engine.", "support": { "issues": "https://github.com/ichiloto/editor/issues", - "source": "https://github.com/ichiloto/editor/tree/0.5.0" + "source": "https://github.com/ichiloto/editor/tree/0.5.1" }, - "time": "2026-08-21T17:55:58+00:00" + "time": "2026-09-14T02:30:38+00:00" }, { "name": "ichiloto/engine",