Skip to content

Commit 0868d97

Browse files
committed
Use GitHub actions for continuous integration (CI)
Bye bye Travis CI, you've served us well.
1 parent e6e4ac2 commit 0868d97

File tree

5 files changed

+46
-36
lines changed

5 files changed

+46
-36
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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
- 7.4
17+
- 7.3
18+
- 7.2
19+
- 7.1
20+
- 7.0
21+
- 5.6
22+
- 5.5
23+
- 5.4
24+
- 5.3
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
coverage: xdebug
31+
- run: sudo apt-get -qq update || true # update package list and ignore temporary network errors
32+
- run: sudo apt-get --no-install-recommends -qq install -y asterisk
33+
- run: sudo cp tests/username.conf /etc/asterisk/manager.d/username.conf
34+
- run: sudo /etc/init.d/asterisk reload
35+
- run: composer install
36+
- run: sudo /etc/init.d/asterisk status || sudo /etc/init.d/asterisk start
37+
- run: sudo /etc/init.d/asterisk status || sleep 2
38+
- run: vendor/bin/phpunit --coverage-text
39+
if: ${{ matrix.php >= 7.3 }}
40+
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
41+
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: 3 additions & 1 deletion
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).

0 commit comments

Comments
 (0)