-
-
Notifications
You must be signed in to change notification settings - Fork 36
51 lines (51 loc) · 1.71 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
name: CI
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3']
name: Tests - PHP ${{ matrix.php }}
concurrency:
group: ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}-${{ matrix.php }}
cancel-in-progress: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-db
with:
path: ~/.symfony/cache
key: db
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
- name: Report PHP version
run: php -v
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.php }}-composer-
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress --no-suggest
- name: check dependency
uses: symfonycorp/security-checker-action@v5
- name: Check quality code
env:
PHP_CS_FIXER_IGNORE_ENV: 1
run: vendor/bin/php-cs-fixer fix --ansi --dry-run --using-cache=no --verbose
- name: Execute phpstan
run: vendor/bin/phpstan
- name: Execute tests
run: vendor/bin/phpunit --verbose