1
+ name : " Static Analyze"
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - " 4.x"
8
+ schedule :
9
+ - cron : ' * 8 * * *'
10
+
11
+ jobs :
12
+ compatibility :
13
+ name : " Static Analyze"
14
+
15
+ runs-on : ${{ matrix.operating-system }}
16
+
17
+ strategy :
18
+ matrix :
19
+ dependencies :
20
+ - " locked"
21
+ php-version :
22
+ - " 7.4"
23
+ operating-system :
24
+ - " ubuntu-latest"
25
+
26
+ steps :
27
+ - name : " Checkout"
28
+ uses : " actions/checkout@v2"
29
+
30
+ - name : " Install PHP"
31
+ uses : " shivammathur/setup-php@v2"
32
+ with :
33
+ coverage : " pcov"
34
+ php-version : " ${{ matrix.php-version }}"
35
+ ini-values : memory_limit=-1
36
+ tools : phive, composer:v2
37
+
38
+ - name : " Cache Phive dependencies"
39
+ uses : " actions/cache@v2"
40
+ with :
41
+ path : |
42
+ ~/.phive
43
+ key : " ${{ runner.os }}-phive-${{ hashFiles('**/phars.xml') }}"
44
+ restore-keys : |
45
+ ${{ runner.os }}-phive-
46
+
47
+ - name : " Get Composer Cache Directory"
48
+ id : composer-cache
49
+ run : |
50
+ echo "::set-output name=dir::$(composer config cache-files-dir)"
51
+
52
+ - name : " Cache Composer dependencies"
53
+ uses : " actions/cache@v2"
54
+ with :
55
+ path : |
56
+ ${{ steps.composer-cache.outputs.dir }}
57
+ key : " php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
58
+ restore-keys : |
59
+ php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
60
+
61
+ - name : " Install tools"
62
+ run : " phive install --trust-gpg-keys E82B2FB314E9906E,CF1A108D0E7AE720,8A03EA3B385DBAA1,12CE0F1D262429A5 --force-accept-unsigned"
63
+
64
+ - name : " Install lowest dependencies"
65
+ if : ${{ matrix.dependencies == 'lowest' }}
66
+ run : " composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
67
+
68
+ - name : " Install highest dependencies"
69
+ if : ${{ matrix.dependencies == 'highest' }}
70
+ run : " composer update --no-interaction --no-progress --no-suggest"
71
+
72
+ - name : " Install locked dependencies"
73
+ if : ${{ matrix.dependencies == 'locked' }}
74
+ run : " composer install --no-interaction --no-progress --no-suggest"
75
+
76
+ - name : " Static Analyze"
77
+ run : " composer static:analyze"
0 commit comments