Skip to content

Commit 32f6820

Browse files
committed
Workflow
1 parent 1183a93 commit 32f6820

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/php.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: PHP Composer
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
COMPOSER_ROOT_VERSION: dev-main
10+
11+
jobs:
12+
tests:
13+
name: Run tests
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
php-version: ['8.3', '8.4', '8.5']
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Validate composer.json and composer.lock
25+
uses: php-actions/composer@v6
26+
with:
27+
command: validate --strict
28+
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v4
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-php-
37+
38+
- name: Install dependencies
39+
uses: php-actions/composer@v6
40+
with:
41+
php_version: ${{ matrix.php-version }}
42+
php_extensions: ffi
43+
args: --prefer-dist --no-progress
44+
45+
- name: Run test suite
46+
uses: php-actions/phpunit@v4
47+
with:
48+
php_version: ${{ matrix.php-version }}
49+
php_extensions: ffi

0 commit comments

Comments
 (0)