Skip to content

Warn in the README that the package is not ready for use #2

Warn in the README that the package is not ready for use

Warn in the README that the package is not ready for use #2

Workflow file for this run

name: Test
on:
push:
pull_request:
release:
types:
- published
permissions:
contents: read
jobs:
test:
name: "PHP ${{ matrix.php-versions }} / PHPUnit ${{ matrix.phpunit }}"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: false
matrix:
# Every supported PHP version, paired with the PHPUnit majors that run on it.
# PHPUnit 10 needs PHP 8.1+, PHPUnit 11 needs 8.2+, PHPUnit 12 needs 8.3+.
include:
- { php-versions: '8.0', phpunit: '^9.6' }
- { php-versions: '8.1', phpunit: '^9.6' }
- { php-versions: '8.1', phpunit: '^10.0' }
- { php-versions: '8.2', phpunit: '^10.0' }
- { php-versions: '8.2', phpunit: '^11.0' }
- { php-versions: '8.3', phpunit: '^11.0' }
- { php-versions: '8.3', phpunit: '^12.0' }
- { php-versions: '8.4', phpunit: '^12.0' }
- { php-versions: '8.5', phpunit: '^12.0' }
steps:
- uses: actions/checkout@v5
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate composer.json
run: composer validate --no-check-lock
- name: Install dependencies
run: composer update --prefer-dist --no-progress --with "phpunit/phpunit:${{ matrix.phpunit }}"
- name: Test
run: ./bin/phpunit
lowest-deps:
name: "Lowest supported phparkitect"
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v5
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.0'
tools: composer:v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer update --prefer-dist --no-progress --with "phparkitect/phparkitect:1.0.0" --with "phpunit/phpunit:^9.6"
- name: Test
run: ./bin/phpunit
static-analysis:
name: "Psalm"
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v5
# Psalm 6 needs PHP >= 8.1 to run; the analysis target stays 8.0 (phpVersion in psalm.xml)
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.1'
tools: composer:v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
composer update --prefer-dist --no-progress
composer install --prefer-dist --no-progress -d tools/psalm
- name: Static analysis
run: tools/psalm/vendor/bin/psalm --no-cache