-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (54 loc) · 1.77 KB
/
tests.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
name: tests
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# symfony 7
- php: 8.3
- php: 8.2
# symfony 6
- php: 8.3
composer-dependencies: symfony/symfony:^6
- php: 8.2
composer-dependencies: symfony/symfony:^6
- php: 8.1
composer-dependencies: symfony/symfony:^6
# symfony 5
- php: 8.3
composer-dependencies: symfony/symfony:^5
- php: 8.2
composer-dependencies: symfony/symfony:^5
- php: 8.1
composer-dependencies: symfony/symfony:^5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: composer:v2
- name: Determine composer cache directory
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
- name: Require additional dependencies
run: composer require ${{ matrix.composer-dependencies }} --dev --no-update
if: ${{ matrix.composer-dependencies }}
- name: Install dependencies
run: |
echo "::group::composer update"
composer update --no-progress --no-suggest --ansi --prefer-dist
echo "::endgroup::"
- name: Run tests
run: composer run-script test