forked from thecodingmachine/phpstan-safe-rule
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (50 loc) · 1.21 KB
/
tests.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
53
54
name: Automated Tests
on:
push:
branches:
- master
- main
tags:
- '*'
pull_request:
jobs:
tests:
name: Unit Tests (PHP ${{ matrix.php }})
strategy:
matrix:
php: ['8.2', '8.3', '8.4']
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor
key: vendor-${{ hashFiles('composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- uses: php-actions/composer@v6
- run: vendor/bin/phpunit tests --coverage-text --coverage-filter src
static:
name: Static Analysis
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor
key: vendor-${{ hashFiles('composer.json') }}
- uses: php-actions/composer@v6
- run: ./vendor/bin/phpstan analyse src --level 5
format:
name: Formatting
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor
key: vendor-${{ hashFiles('composer.json') }}
- uses: php-actions/composer@v6
- run: ./vendor/bin/phpcs