-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.32 KB
/
test.yml
File metadata and controls
52 lines (41 loc) · 1.32 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
name: Test
on:
push:
branches: [ 'main' ]
pull_request:
types: [ 'opened', 'synchronize', 'reopened' ]
jobs:
test:
name: Test on PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '8.2', '8.3', '8.4' ]
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v4.3.0
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install Dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Check Code Style
run: composer pint-test
- name: Execute Static Code analysis
run: composer analyse
- name: Execute Unit, Integration and Acceptance Tests
run: composer test