-
-
Notifications
You must be signed in to change notification settings - Fork 188
77 lines (62 loc) · 2.69 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
name: CI
on:
[push, pull_request]
jobs:
test:
name: '${{ matrix.deps }} | PHP ${{ matrix.php }} | Symfony ${{ matrix.symfony }}'
runs-on: ubuntu-latest
env:
SYMFONY_DEPRECATIONS_HELPER: "baselineFile=./.build/deprecations-baseline.json&max[self]=0"
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3']
deps: ['stable']
symfony: [''] # Don't lock to a specific symfony version by default
include:
# Test lowest dependencies
- deps: 'lowest'
php: '8.1'
# Test latest php with LTS versions.
- deps: 'lts'
php: '8.3'
symfony: '^6.4'
steps:
- uses: actions/checkout@v4
- name: Set-up env variables
run: |
case "${{ matrix.deps }}" in
"lowest")
echo "COMPOSER_FLAGS=--prefer-lowest" >> $GITHUB_ENV
echo "SYMFONY_REQUIRE=$(echo '${{ matrix.symfony }}')" >> $GITHUB_ENV
;;
*)
echo "SYMFONY_REQUIRE=$(echo '${{ matrix.symfony }}')" >> $GITHUB_ENV
esac
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: pecl,flex
extensions: imagick
- name: Set correct imagick policy
run: sudo sed -i -e 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read|write" pattern="PDF" \/>/' /etc/ImageMagick-6/policy.xml
- name: Install Composer Dependencies
run: composer update --prefer-dist --no-progress $COMPOSER_FLAGS
- name: Run phpunit
run: vendor/bin/phpunit -v
validate_composer:
name: Validate composer files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sh ./.build/validate-composer.sh || exit $?