-
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (56 loc) · 1.89 KB
/
CI.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: "PHPStan and Phan"
on:
push:
branches: "*"
pull_request:
env:
cache-version: 1
jobs:
standard:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.0', '8.1', '8.2', '8.3']
env:
php-extensions: ast
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup PHP extension caching"
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
key: php-extensions-${{ runner.os }}-foov4-${{ env.cache-version }}
- name: "Cache extensions"
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}-foov4
restore-keys: ${{ steps.extcache.outputs.key }}-foov4
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.php-extensions }}
coverage: none
- name: "Cache Composer dependencies"
id: composer-dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-dependencies-${{ runner.os }}-foov4-${{ env.cache-version }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-dependencies-${{ runner.os }}-foov4-${{ env.cache-version }}-${{ hashFiles('composer.json') }}
composer-dependencies-${{ runner.os }}-foov4-${{ env.cache-version }}-
composer-dependencies-${{ runner.os }}-
- name: "Install Composer dependencies"
run: |
composer install -n --prefer-dist
cd src
composer install -n --prefer-dist
- name: "Code analyser"
run: |
composer run-script code-analyser