CI: Add PHP 8.4 to the matrix #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
cs: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" | |
name: Coding Style | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.3" | |
extensions: mbstring | |
tools: composer:v2 | |
coverage: none | |
- name: Set COMPOSER_ROOT_VERSION | |
run: echo "COMPOSER_ROOT_VERSION=0.3.99" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-interaction --no-progress | |
- name: Check Coding Style - PHP | |
run: vendor/bin/php-cs-fixer fix --dry-run --using-cache=no --diff --verbose | |
- name: Check composer.json format | |
run: | | |
composer remove --no-interaction roundcube/roundcubemail | |
composer validate --strict --no-check-lock && composer normalize --dry-run --no-check-lock | |
phpstan: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" | |
name: Static Analysis | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.3" | |
extensions: mbstring | |
tools: composer:v2 | |
coverage: none | |
- name: Set COMPOSER_ROOT_VERSION | |
run: echo "COMPOSER_ROOT_VERSION=0.3.99" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-interaction --no-progress | |
- name: Run Static Analysis | |
run: vendor/bin/phpstan analyse | |
test: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] | |
name: Test / PHP ${{ matrix.php }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring | |
tools: composer:v2 | |
coverage: none | |
- name: Set COMPOSER_ROOT_VERSION | |
run: echo "COMPOSER_ROOT_VERSION=0.3.99" >> $GITHUB_ENV | |
- name: Test Roundcubemail as dependency - install plugin | |
run: | | |
cd test-composer | |
composer install -v --prefer-dist --no-interaction --no-progress | |
- name: Test Roundcubemail as dependency - verify install | |
run: | | |
cd test-composer | |
ls -lah vendor/roundcube/roundcubemail/plugins/carddav/config.* | |
if [ ! -f vendor/roundcube/roundcubemail/plugins/carddav/config.inc.php ]; then echo 'Config file was not created' && exit 1; fi | |
- name: Test Roundcubemail as root project - install plugin | |
run: | | |
cd test-composer/vendor/roundcube/roundcubemail | |
ls -lah plugins/acl/config.* | |
if [ -f plugins/acl/config.inc.php ]; then echo 'Config file is not expected' && exit 1; fi | |
composer install -v --prefer-dist --no-interaction --no-progress | |
- name: Test Roundcubemail as root project - verify install | |
run: | | |
cd test-composer/vendor/roundcube/roundcubemail | |
ls -lah plugins/acl/config.* | |
if [ ! -f plugins/acl/config.inc.php ]; then echo 'Config file was not created' && exit 1; fi | |
- name: Test update - install plugin | |
run: | | |
cd test-composer | |
echo '// xxx no config update xxx' >> vendor/roundcube/roundcubemail/plugins/carddav/config.inc.php | |
composer update -v --prefer-dist --no-interaction --no-progress roundcube/carddav --prefer-lowest | |
- name: Test update - verify install | |
run: | | |
cd test-composer | |
ls -lah vendor/roundcube/roundcubemail/plugins/carddav/config.* | |
if [ ! -f vendor/roundcube/roundcubemail/plugins/carddav/config.inc.php ]; then echo 'Config file was deleted' && exit 1; fi | |
if ! grep -Fq 'xxx no config update xxx' vendor/roundcube/roundcubemail/plugins/carddav/config.inc.php; then echo 'Config file was replaced' && exit 1; fi |