forked from CollaboraOnline/collabora-drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (58 loc) · 2.28 KB
/
ci.yaml
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
name: CI
on:
- push
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3]
steps:
- uses: actions/checkout@v4
- name: Prepare docker-compose
run: |
set -x
# Set the php version in docker-compose.yml.
sed -i -e 's/httpd-php-dev:8.[0-9]/httpd-php-dev:${{ matrix.php }}/g' docker-compose.yml
# Report what was changed.
git diff
- name: Install docker-compose
run: |
set -x
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start docker-compose
run: |
docker-compose up -d
- name: Tune the container
run: |
set -x
# Report before.
docker-compose exec -T web php --version
docker-compose exec -T web php --info | grep xdebug.mode
# Disable xdebug.
docker-compose exec -T web phpdismod xdebug
# Restart the web server.
docker-compose exec -T web /etc/init.d/php${{ matrix.php }}-fpm restart
# Report after.
docker-compose exec -T web php --version
docker-compose exec -T web php --info | grep xdebug.mode || true
- name: Composer install
run: |
docker-compose exec -T web composer config --merge --json "extra.patches" '{"drupal/group": {"Using a translatable string as a category for field type is deprecated - https://www.drupal.org/project/group/issues/3458530": "https://www.drupal.org/files/issues/2024-07-02/group-translate-string-as-category-is-deprecated_0.patch"}}'
docker-compose exec -T web composer require --dev cweagans/composer-patches
- name: PhpCS
run: |
docker-compose exec -T web ./vendor/bin/phpcs -s
- name: Drupal site install
run: |
docker-compose exec -T web ./vendor/bin/run drupal:site-install
- name: PhpUnit
run: |
docker-compose exec -T web ./vendor/bin/phpunit -vvv --debug
- name: PhpUnit - groupmedia 3
run: |
docker-compose exec -T web composer require --dev drupal/groupmedia:^3 -W
docker-compose exec -T web ./vendor/bin/phpunit -vvv --debug --testsuite "Collabora Online Group"