forked from luca-script/communism
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (68 loc) · 1.89 KB
/
Copy pathphp.yml
File metadata and controls
81 lines (68 loc) · 1.89 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Run Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
name: "${{ matrix.os_name }} (PHP ${{ matrix.php_version }})"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-26.04
os_name: Linux
php_version: '8.4'
- os: ubuntu-26.04
os_name: Linux
php_version: '8.5'
- os: windows-2025
os_name: Windows
php_version: '8.4'
- os: windows-2025
os_name: Windows
php_version: '8.5'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up PHP with FFI
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: ffi, mbstring
ini-values: ffi.enable=true
coverage: none
env:
fail-fast: true
- name: Verify PHP and FFI
shell: bash
run: |
php --version
php --ri ffi
php -r '
if (!extension_loaded("ffi")) {
fwrite(STDERR, "FFI extension is not loaded\n");
exit(1);
}
if (ini_get("ffi.enable") !== "1") {
fwrite(STDERR, "FFI is not fully enabled\n");
exit(1);
}
echo "FFI is working\n";
'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php_version }}-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
run: composer run-script test