-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.48 KB
/
larastan.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: "Static code analysis (Larastan)"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_call:
jobs:
test:
name: Run Larastan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, mysql
coverage: none
- name: Get Composer Cache Directory
id: cache-composer
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Restore Composer cache
uses: actions/cache@v4
with:
path: ${{ steps.cache-composer.outputs.dir }}
key: ${{ runner.os }}-${{ github.ref_name }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Copy .env to .env.example
run: cp .env.example .env
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- name: Generate application key
run: php artisan key:generate
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run Larastan
run: composer analyse