-
Notifications
You must be signed in to change notification settings - Fork 37
52 lines (43 loc) · 1.74 KB
/
phpstan.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
name: PHPStan
on: [ push, pull_request ]
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: [ '1.7.5.0', '1.7.5.2', '1.7.6.9', '1.7.7.8', '1.7.8.5' ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
- name: Cache composer folder
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-composer-cache
- name: Cache Prestashop source code
id: cache_prestashop_source
uses: actions/cache@v2
with:
path: ${{ runner.temp }}/prestashop/
key: ${{ runner.os }}-${{ matrix.presta-versions }}
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
- name : "Install module dependencies"
run: composer install
- name : "Extract Prestashop"
if: steps.cache_prestashop_source.outputs.cache-hit != 'true'
run : |
echo "no cache for Prestashop ${{ matrix.presta-versions }} source. Fectching and extracting source code..."
wget https://github.com/PrestaShop/PrestaShop/releases/download/${{ matrix.presta-versions }}/prestashop_${{ matrix.presta-versions }}.zip --quiet --output-document ${{ runner.temp }}/prestashop.zip
unzip -q ${{ runner.temp }}/prestashop.zip -d ${{ runner.temp }}/prestashop_zip
unzip -q ${{ runner.temp }}/prestashop_zip/prestashop.zip -d ${{ runner.temp }}/prestashop
- name: "Run phpstan"
run: _PS_ROOT_DIR_=${{ runner.temp }}/prestashop/ php ./vendor/bin/phpstan analyse ./