Skip to content

Commit ab42c3d

Browse files
committed
Test install using real composer plugin
1 parent a5dd5f2 commit ab42c3d

3 files changed

Lines changed: 64 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,40 @@ jobs:
6666

6767
- name: Run Static Analysis
6868
run: vendor/bin/phpstan analyse
69+
70+
test:
71+
runs-on: ubuntu-latest
72+
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
73+
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
78+
79+
name: Test / PHP ${{ matrix.php }}
80+
81+
steps:
82+
- name: Checkout code
83+
uses: actions/checkout@v4
84+
85+
- name: Setup PHP
86+
uses: shivammathur/setup-php@v2
87+
with:
88+
php-version: ${{ matrix.php }}
89+
extensions: mbstring
90+
tools: composer:v2
91+
coverage: none
92+
93+
- name: Set COMPOSER_ROOT_VERSION
94+
run: echo "COMPOSER_ROOT_VERSION=0.3.99" >> $GITHUB_ENV
95+
96+
- name: Test - install plugin
97+
run: |
98+
cd test-composer
99+
composer install --prefer-dist --no-interaction --no-progress
100+
101+
- name: Test - verify install
102+
run: |
103+
cd test-composer
104+
ls -lah vendor/roundcube/roundcubemail/plugins/carddav
105+
ls -lah vendor/roundcube/roundcubemail/plugins/carddav/config.inc.php

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/composer.lock
2-
/vendor
2+
/vendor/
3+
4+
/test-composer/*
5+
!/test-composer/composer.json

test-composer/composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "roundcube/plugin-installer-test",
3+
"require": {
4+
"roundcube/carddav": "^4 || ^5"
5+
},
6+
"repositories": [
7+
{
8+
"type": "git",
9+
"url": "https://github.com/roundcube/roundcubemail.git"
10+
},
11+
{
12+
"type": "path",
13+
"url": ".."
14+
}
15+
],
16+
"minimum-stability": "dev",
17+
"prefer-stable": true,
18+
"config": {
19+
"allow-plugins": {
20+
"roundcube/plugin-installer": true
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)