Skip to content

v0.1.1

v0.1.1 #10

Workflow file for this run

name: LSP CI
# PHPUnit runs on every PR + push to main as a hard gate.
# Infection (mutation testing) is opt-in via workflow_dispatch -- its
# resource envelope outgrew GitHub-hosted `ubuntu-latest` (~7 GB RAM)
# once the suite passed ~150 tests, and the initial coverage run now
# OOMs as SIGTERM 143 mid-stream. Re-enable as a PR gate once the
# job is reshaped to filter / batch the test set (see follow-up).
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
# Per-workflow concurrency. See ci-core.yml for the rationale.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phpunit-lsp:
name: PHPUnit (LSP)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP 8.4
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, json, mbstring, tokenizer
coverage: none
tools: composer:v2
# The LSP package has its own composer.json under tools/lsp/ with a
# path-repo pointing back at the repo root. Cache its deps separately
# from the core install so a core-only change doesn't bust the LSP cache.
- name: Install LSP dependencies
uses: ramsey/composer-install@v3
- name: Run PHPUnit (LSP)
run: make test/unit
behat-lsp:
name: Behat (LSP acceptance)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP 8.4
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, json, mbstring, tokenizer
coverage: none
tools: composer:v2
# Root deps first -- the isolated Behat install autoloads the root
# vendor/autoload at runtime (see tools/behat/composer.json).
- name: Install LSP dependencies
uses: ramsey/composer-install@v3
# Behat lives in its own composer.json (tools/behat) because Behat 3.x
# caps symfony/console at ^7 while the root pins ^8 via xphp-lang/xphp.
- name: Install Behat tooling dependencies
run: composer install --working-dir=tools/behat --no-interaction
# Drives the real LSP dispatcher end-to-end, fully in-memory; @todo
# scenarios are skipped via the gherkin tag filter in behat.dist.yml.
- name: Run Behat acceptance suite
run: make test/behat
infection-lsp:
name: Mutation testing (LSP)
# Gate: only run when explicitly requested via the Actions tab. The
# 424-test suite plus per-mutation reruns overruns the GitHub-hosted
# runner's RAM, killing the initial coverage subprocess with SIGTERM
# 143. PRs and merges to main get fast unambiguous signal from the
# PHPUnit job above; Infection scoring is opt-in until the job is
# reshaped to filter / batch the test set.
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: phpunit-lsp
steps:
- uses: actions/checkout@v4
- name: Setup PHP 8.4 (with PCOV for coverage)
# PCOV is preferred over Xdebug for Infection's initial run: an
# order of magnitude less memory under the same coverage scope,
# which keeps the runner well clear of the OOM-killer. The
# Makefile target sets pcov.directory + XDEBUG_MODE=off so the
# driver choice is deterministic regardless of what else is loaded.
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, json, mbstring, tokenizer
coverage: pcov
tools: composer:v2
- name: Install LSP dependencies
uses: ramsey/composer-install@v3
- name: Run Infection (LSP)
# `make test/mutation` lazily downloads infection.phar
# 0.33.1 into tools/lsp/var/ (PHAR sidesteps the composer dep conflict
# with phpactor/language-server documented in tools/lsp/README.md).
# Runs with --min-covered-msi=93; current baseline is 94%.
run: make test/mutation
- name: Upload Infection report (LSP)
if: always()
uses: actions/upload-artifact@v4
with:
name: infection-lsp-report
path: |
tools/lsp/var/infection.log
tools/lsp/var/infection.html
if-no-files-found: ignore
retention-days: 14