1
- name : Tests
1
+ name : " Tests"
2
2
3
3
on :
4
- push :
5
- branches :
6
- - master
7
4
pull_request :
5
+ push :
8
6
branches :
9
- - master
7
+ - " master"
8
+ schedule :
9
+ - cron : ' * 8 * * *'
10
10
11
11
jobs :
12
- build :
13
- name : Tests
14
- runs-on : ubuntu-latest
12
+ compatibility :
13
+ name : " Tests"
14
+
15
+ runs-on : ${{ matrix.operating-system }}
15
16
16
17
strategy :
17
18
matrix :
18
- operating-system : [ubuntu-latest, windows-latest, macOS-latest]
19
- php-versions : ['7.2', '7.3', '7.4']
19
+ dependencies :
20
+ - " locked"
21
+ - " lowest"
22
+ - " highest"
23
+ php-version :
24
+ - " 8.0"
25
+ - " 7.4"
26
+ - " 7.3"
27
+ - " 7.2"
28
+ operating-system :
29
+ - " ubuntu-latest"
20
30
21
31
steps :
22
- - uses : actions/checkout@master
32
+ - name : " Checkout"
33
+ uses : " actions/checkout@v2"
23
34
24
- - name : Setup PHP
25
- uses : shivammathur/setup-php@master
35
+ - name : " Install PHP"
36
+ uses : " shivammathur/setup-php@v2 "
26
37
with :
27
- php-version : ${{ matrix.php-versions }}
28
- coverage : none
38
+ coverage : " pcov"
39
+ php-version : " ${{ matrix.php-version }}"
40
+ ini-values : memory_limit=-1
41
+ tools : phive, composer:v2
29
42
30
- - name : Get Composer Cache Directory
31
- id : composer-cache
32
- run : |
33
- echo "::set-output name=dir::$(composer config cache-files-dir)"
43
+ - name : " Install tools"
44
+ run : " phive install --trust-gpg-keys E82B2FB314E9906E"
45
+ continue-on-error : ${{ matrix.php-version == '8.0' }}
34
46
35
- - uses : actions/cache@v1
36
- with :
37
- path : ${{ steps.composer-cache.outputs.dir }}
38
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
39
- restore-keys : |
40
- ${{ runner.os }}-composer-
47
+ - name : " Install lowest dependencies"
48
+ if : ${{ matrix.dependencies == 'lowest' }}
49
+ run : " composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
50
+ continue-on-error : ${{ matrix.php-version == '8.0' }}
41
51
42
- - name : Install dependecies - lowest versions
43
- if : matrix.php-versions == '7.0'
44
- run : composer update --prefer-lowest
52
+ - name : " Install highest dependencies"
53
+ if : ${{ matrix.dependencies == 'highest'}}
54
+ run : " composer update --no-interaction --no-progress --no-suggest"
55
+ continue-on-error : ${{ matrix.php-version == '8.0' }}
45
56
46
- - name : Install dependecies
47
- if : matrix.php-versions != '7.0'
48
- run : composer update --prefer-lowest
57
+ - name : " Install locked dependencies"
58
+ if : ${{ matrix.dependencies == 'locked' && matrix.php-version == '7.4' }}
59
+ run : " composer install --no-interaction --no-progress --no-suggest"
60
+ continue-on-error : ${{ matrix.php-version == '8.0' }}
49
61
50
- - name : Run tests
51
- run : composer test
62
+ - name : " Install highest dependencies"
63
+ if : ${{ matrix.dependencies == 'locked' && matrix.php-version != '7.4' }}
64
+ run : " composer update --no-interaction --no-progress --no-suggest"
65
+ continue-on-error : ${{ matrix.php-version == '8.0' }}
52
66
67
+ - name : " Tests"
68
+ run : " composer test"
69
+ continue-on-error : ${{ matrix.php-version == '8.0' }}
0 commit comments