-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.22 KB
/
ci.yml
File metadata and controls
51 lines (41 loc) · 1.22 KB
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:
branches:
- master
pull_request:
branches:
- master
jobs:
quality:
name: PHPUnit, PHPStan and Composer Audit
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
tools: composer:v2
coverage: xdebug
- name: Validate composer files
run: composer validate --strict --no-check-publish
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction
- name: Run PHPUnit
env:
XDEBUG_MODE: coverage
run: vendor/bin/phpunit --colors=never
- name: Run PHPStan
run: vendor/bin/phpstan analyse src tests --level max --memory-limit=-1
- name: Run Composer audit
run: composer audit --locked --no-interaction