Skip to content

Commit a9934ca

Browse files
authored
Merge pull request #67 from SimonFrings/ci
Use GitHub actions for continuous integration (CI) and support PHP 8
2 parents e6e4ac2 + a7ce365 commit a9934ca

File tree

5 files changed

+48
-37
lines changed

5 files changed

+48
-37
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/.gitattributes export-ignore
2+
/.github/workflows/ export-ignore
23
/.gitignore export-ignore
3-
/.travis.yml export-ignore
44
/examples/ export-ignore
55
/phpunit.xml.dist export-ignore
66
/phpunit.xml.legacy export-ignore

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
PHPUnit:
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-20.04
11+
env:
12+
LOGIN: username:password@localhost
13+
strategy:
14+
matrix:
15+
php:
16+
- 8.0
17+
- 7.4
18+
- 7.3
19+
- 7.2
20+
- 7.1
21+
- 7.0
22+
- 5.6
23+
- 5.5
24+
- 5.4
25+
- 5.3
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
coverage: xdebug
32+
- run: sudo apt-get -qq update || true # update package list and ignore temporary network errors
33+
- run: sudo apt-get --no-install-recommends -qq install -y asterisk
34+
- run: sudo cp tests/username.conf /etc/asterisk/manager.d/username.conf
35+
- run: sudo /etc/init.d/asterisk reload
36+
- run: composer install
37+
- run: sudo /etc/init.d/asterisk status || sudo /etc/init.d/asterisk start
38+
- run: sudo /etc/init.d/asterisk status || sleep 2
39+
- run: vendor/bin/phpunit --coverage-text
40+
if: ${{ matrix.php >= 7.3 }}
41+
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
42+
if: ${{ matrix.php < 7.3 }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/vendor
21
/composer.lock
2+
/vendor/

.travis.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# clue/reactphp-ami [![Build Status](https://travis-ci.org/clue/reactphp-ami.svg?branch=master)](https://travis-ci.org/clue/reactphp-ami)
1+
# clue/reactphp-ami
2+
3+
[![CI status](https://github.com/clue/reactphp-ami/workflows/CI/badge.svg)](https://github.com/clue/reactphp-ami/actions)
24

35
Streaming, event-driven access to the Asterisk Manager Interface (AMI),
46
built on top of [ReactPHP](https://reactphp.org).
@@ -555,7 +557,7 @@ $ composer require clue/ami-react:^1.1
555557
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
556558

557559
This project aims to run on any platform and thus does not require any PHP
558-
extensions and supports running on legacy PHP 5.3 through current PHP 7+.
560+
extensions and supports running on legacy PHP 5.3 through current PHP 8+.
559561
It's *highly recommended to use PHP 7+* for this project.
560562

561563
## Tests

0 commit comments

Comments
 (0)