-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1007 Bytes
/
main.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
name: PHP Composer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
name: Test on php ${{ matrix.php_version }}
runs-on: ubuntu-latest
strategy:
matrix:
php_version: ['8.1', '8.2']
steps:
- uses: actions/checkout@v3
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Validate dependencies
uses: php-actions/composer@v6
with:
command: validate
- name: Install dependencies on php ${{ matrix.php_version }}
uses: php-actions/composer@v6
with:
php_version: "${{ matrix.php_version }}"
version: 2
- name: Run phpunit tests on php ${{ matrix.php_version }}
uses: php-actions/phpunit@v3
with:
php_version: "${{ matrix.php_version }}"