-
Notifications
You must be signed in to change notification settings - Fork 42
59 lines (48 loc) · 2.11 KB
/
unit-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
name: "unit tests"
on: [ "pull_request", "push" ]
jobs:
unit-tests:
name: "unit tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
symfony-version:
- "5.4.*"
- "6.3.*"
- "7.0.*"
php-version:
- "8.1.*"
- "8.2.*"
dependencies:
- "lowest"
- "highest"
steps:
- name: "checkout"
uses: "actions/checkout@v2"
- name: "installing PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2, cs2pr
extensions: intl, bcmath, curl, openssl, mbstring
coverage: pcov
ini-values: memory_limit=-1
- name: "caching dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}"
restore-keys: "php-${{ matrix.php-version }}"
- name: "configuring symfony dependencies"
run: |
composer require --no-update symfony/dependency-injection=${{ matrix.symfony-version }} symfony/http-foundation=${{ matrix.symfony-version }} symfony/http-kernel=${{ matrix.symfony-version }} symfony/security-core=${{ matrix.symfony-version }} symfony/config=${{ matrix.symfony-version }}
- name: "install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-interaction --no-progress --prefer-dist
- name: "install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: composer update --no-interaction --no-progress --prefer-dist
- name: "running unit tests"
run: vendor/bin/simple-phpunit