Skip to content

Commit e882738

Browse files
committed
Add github action
1 parent cea11d0 commit e882738

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/php.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: ['ubuntu-latest']
16+
php-versions: [7.3, 7.4, 8.0]
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-versions }}
24+
extensions: soap
25+
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate
28+
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v2
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+
run: composer install --prefer-dist --no-progress --no-suggest
40+
41+
- name: Run test suite
42+
run: composer run-script test

0 commit comments

Comments
 (0)