diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/ci.yml similarity index 68% rename from .github/workflows/code-coverage.yaml rename to .github/workflows/ci.yml index 52f60816..4a354fbf 100644 --- a/.github/workflows/code-coverage.yaml +++ b/.github/workflows/ci.yml @@ -1,18 +1,27 @@ -name: PHPUnit Coverage Report +name: Continuous integration on: + workflow_dispatch: ~ push: - branches: [develop, main] + branches: + - develop + - main pull_request: - branches: [develop, main] - workflow_dispatch: ~ + branches: + - develop + - main jobs: ci: + name: Linting, tests and coverage runs-on: ubuntu-22.04 - defaults: - run: - working-directory: ./ + + strategy: + matrix: + php-version: + - 8.1 + - 8.2 + - 8.3 steps: - uses: actions/checkout@v4 @@ -20,8 +29,8 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 5.6 - tools: composer:v1 + php-version: ${{ matrix.php-version }} + tools: composer:v2 - name: Validate composer.json and composer.lock run: composer validate diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml deleted file mode 100644 index 739638d0..00000000 --- a/.github/workflows/php.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: PHP Lint and unit tests - -on: - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: ~ - -jobs: - ci: - runs-on: ubuntu-20.04 - defaults: - run: - working-directory: ./ - - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 5.6 - tools: composer:v1 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest - - - name: Ensure source code is linted - run: ./vendor/bin/phpcs src - - - name: Ensure unit test are green - run: ./vendor/bin/phpunit -c phpunit.ci.xml diff --git a/README.md b/README.md index 77609ddb..eea3d897 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you find yourself needing to use some endpoints that are not yet implemented, Installation ------------ -The Alma PHP API Client library requires at least PHP 5.6. +The Alma PHP API Client library is tested against all recently supported PHP versions. A modern, [supported PHP version](https://www.php.net/supported-versions.php) is highly recommended. ### Composer diff --git a/composer.json b/composer.json index c6434a71..060c58bc 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "version": "2.0.7", "type": "library", "require": { - "php": "^5.6 || ~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4 || ~8.0 || ~8.1 || ~8.2", + "php": "^5.6 || ~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4 || ~8.0 || ~8.1 || ~8.2 || ~8.3", "psr/log": "^1 || ^2 || ^3", "ext-curl": "*", "ext-json": "*",