-
Notifications
You must be signed in to change notification settings - Fork 36
74 lines (60 loc) · 2.07 KB
/
build.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
name: "Build"
on:
push:
branches:
- "master"
pull_request: ~
release:
types: ["created"]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
jobs:
build:
runs-on: "ubuntu-latest"
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, PHPUnit ${{ matrix.phpunit }}, PHP-Matcher ${{ matrix.php-matcher }}"
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
symfony: [6.4.*, 7.0.*]
phpunit: [^9.0, ^10.0]
php-matcher: [^6.0]
exclude:
- php: 8.1
symfony: 7.0.*
steps:
- uses: "actions/checkout@v4"
-
name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
coverage: "none"
-
name: "Restrict Symfony version"
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: "Restrict coduo/php-matcher version"
run: "composer require \"coduo/php-matcher:${{ matrix.php-matcher }}\" --no-update --no-scripts"
-
name: "Restrict phpunit/phpunit version"
run: "composer require \"phpunit/phpunit:${{ matrix.phpunit }}\" --no-update --no-scripts"
-
name: "Install dependencies"
run: "composer install --prefer-dist --no-progress --no-suggest"
-
name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
-
name: "Run analyse"
run: "composer analyse"
-
name: "Setup database"
run: "test/app/console doctrine:schema:update --force -vvv"
-
name: "Run tests"
run: "vendor/bin/phpunit"