Skip to content

Commit 3a8a72a

Browse files
committed
Add .github workflow
1 parent cfa27e7 commit 3a8a72a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Run Text_Diff Tests
3+
on:
4+
push:
5+
pull_request:
6+
branches: [master]
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
php:
13+
- 7.4
14+
- 7
15+
- 5.6
16+
- 5.5
17+
- 5.4
18+
- 5.3
19+
os: [ubuntu-latest, ubuntu-22.04]
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php }}
27+
extensions: xdiff
28+
tools: composer, PEAR
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v3
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-php-
37+
- name: Run tests
38+
run: |-
39+
composer install
40+
umask 0022
41+
if [ ${{ matrix.php }} == 5.3 ] ; then
42+
pear run-tests -r tests
43+
else
44+
pear run-tests -d -r tests
45+
fi
46+
pear package package.xml
47+
composer validate

0 commit comments

Comments
 (0)