-
Notifications
You must be signed in to change notification settings - Fork 15
118 lines (91 loc) · 3.59 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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"]
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