Skip to content

Commit 0cf510a

Browse files
authored
chore: test in ci
1 parent 59090cd commit 0cf510a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/php.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
runner-job:
14+
15+
strategy:
16+
matrix:
17+
operating-system: [ubuntu-latest]
18+
php-versions: ['8.0', '8.1', '8.2']
19+
20+
runs-on: ${{ matrix.operating-system }}
21+
22+
services:
23+
redis:
24+
image: redis
25+
ports:
26+
- 6379:6379
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Validate composer.json and composer.lock
32+
run: composer validate --strict
33+
34+
- name: Cache Composer packages
35+
id: composer-cache
36+
uses: actions/cache@v3
37+
with:
38+
path: vendor
39+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-php-
42+
43+
- name: Install dependencies
44+
run: composer install --prefer-dist --no-progress
45+
46+
- name: Run test suite
47+
run: make test

0 commit comments

Comments
 (0)