-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.16 KB
/
Copy pathtests.yml
File metadata and controls
53 lines (41 loc) · 1.16 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
52
53
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.4', '8.5']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, json
coverage: pcov
tools: composer:v2
- name: Validate composer.json
run: composer validate --strict
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ runner.os }}-
- name: Install dependencies
run: composer install --no-progress --no-interaction
- name: Run Mago style check
run: composer run lint
- name: Run Mago static analysis
run: composer run analyze
- name: Run PHPUnit tests
run: composer run test
- name: Check code coverage
run: composer run cover