-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.2 KB
/
build_and_test.yml
File metadata and controls
38 lines (32 loc) · 1.2 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
name: build_and_test
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
name: PHP ${{ matrix.php-version }} Test
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
fail-fast: false # Continue with other versions even if one fails
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-composer-
- name: Install Composer dependencies
run: composer update
- name: Run tests
run: composer test